home *** CD-ROM | disk | FTP | other *** search
MacBinary | 2002-03-05 | 30.0 KB | [TEXT/FB^e] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Mar 5 00:17:02 2002, modified Tue Mar 5 00:17:02 2002, creator 'FB^e', type ASCII, 30061 bytes "Appearance Buttons.Incl" , at 0x75ed 421 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dearkID
| deark: macbinary
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [FB^e] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 17 41 70 70 65 61 72 | 61 6e 63 65 20 42 75 74 |..Appear|ance But|
|00000010| 74 6f 6e 73 2e 49 6e 63 | 6c 00 00 00 00 00 00 00 |tons.Inc|l.......|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 46 42 5e | 65 01 00 00 00 00 01 00 |.TEXTFB^|e.......|
|00000050| 00 00 00 00 00 75 6d 00 | 00 01 a5 b8 aa 05 4e b8 |.....um.|......N.|
|00000060| aa 05 4e 00 00 0e 00 00 | 00 00 00 00 00 00 00 00 |..N.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 71 43 00 00 |........|....qC..|
|00000080| 2f 2f 20 6c 61 73 74 20 | 6d 6f 64 20 52 50 20 39 |// last |mod RP 9|
|00000090| 20 46 65 62 20 30 32 0d | 0d 64 65 66 20 66 6e 20 | Feb 02.|.def fn |
|000000a0| 46 69 78 4c 69 6e 6b 65 | 64 53 63 72 6f 6c 6c 42 |FixLinke|dScrollB|
|000000b0| 61 72 28 20 65 66 50 61 | 6e 65 48 6e 64 6c 20 61 |ar( efPa|neHndl a|
|000000c0| 73 20 43 6f 6e 74 72 6f | 6c 52 65 66 20 29 0d 0d |s Contro|lRef )..|
|000000d0| 2f 2f 20 65 6d 62 65 64 | 20 6f 6e 65 20 63 6f 6e |// embed| one con|
|000000e0| 74 72 6f 6c 20 69 6e 20 | 61 6e 6f 74 68 65 72 2c |trol in |another,|
|000000f0| 20 67 69 76 65 6e 20 74 | 68 65 69 72 20 46 42 20 | given t|heir FB |
|00000100| 62 75 74 74 6f 6e 20 49 | 44 20 6e 75 6d 62 65 72 |button I|D number|
|00000110| 73 0d 72 75 6e 74 69 6d | 65 20 64 65 66 20 45 6d |s.runtim|e def Em|
|00000120| 62 65 64 42 75 74 74 6f | 6e 28 20 63 68 69 6c 64 |bedButto|n( child|
|00000130| 49 44 20 61 73 20 6c 6f | 6e 67 2c 20 70 61 72 65 |ID as lo|ng, pare|
|00000140| 6e 74 73 49 44 20 61 73 | 20 6c 6f 6e 67 20 29 0d |ntsID as| long ).|
|00000150| 27 7e 27 31 0d 64 69 6d | 20 65 72 72 20 61 73 20 |'~'1.dim| err as |
|00000160| 4f 53 45 72 72 0d 65 72 | 72 20 3d 20 66 6e 20 45 |OSErr.er|r = fn E|
|00000170| 6d 62 65 64 43 6f 6e 74 | 72 6f 6c 28 20 20 62 75 |mbedCont|rol( bu|
|00000180| 74 74 6f 6e 26 28 20 63 | 68 69 6c 64 49 44 20 29 |tton&( c|hildID )|
|00000190| 2c 20 62 75 74 74 6f 6e | 26 28 20 70 61 72 65 6e |, button|&( paren|
|000001a0| 74 73 49 44 20 29 20 29 | 0d 6c 6f 6e 67 20 69 66 |tsID ) )|.long if|
|000001b0| 20 65 72 72 0d 66 6e 20 | 52 75 6e 74 69 6d 65 45 | err.fn |RuntimeE|
|000001c0| 72 72 4d 73 67 28 20 22 | 45 6d 62 65 64 42 75 74 |rrMsg( "|EmbedBut|
|000001d0| 74 6f 6e 20 65 72 72 6f | 72 20 22 20 2b 20 73 74 |ton erro|r " + st|
|000001e0| 72 24 28 20 65 72 72 20 | 29 20 2b 20 22 20 66 6f |r$( err |) + " fo|
|000001f0| 72 20 62 75 74 74 6f 6e | 22 20 2b 20 73 74 72 24 |r button|" + str$|
|00000200| 28 20 63 68 69 6c 64 49 | 44 20 29 20 2b 20 22 20 |( childI|D ) + " |
|00000210| 69 6e 22 20 2b 20 73 74 | 72 24 28 20 70 61 72 65 |in" + st|r$( pare|
|00000220| 6e 74 73 49 44 20 29 20 | 29 0d 65 6e 64 20 69 66 |ntsID ) |).end if|
|00000230| 0d 65 6e 64 20 66 6e 0d | 0d 0d 2f 2f 20 61 20 77 |.end fn.|..// a w|
|00000240| 72 61 70 70 65 72 20 66 | 6f 72 20 53 65 74 43 6f |rapper f|or SetCo|
|00000250| 6e 74 72 6f 6c 44 61 74 | 61 2c 20 77 69 74 68 20 |ntrolDat|a, with |
|00000260| 62 74 6e 49 44 2c 20 74 | 68 65 6e 20 72 65 64 72 |btnID, t|hen redr|
|00000270| 61 77 20 63 6f 6e 74 72 | 6f 6c 0d 72 75 6e 74 69 |aw contr|ol.runti|
|00000280| 6d 65 20 64 65 66 20 53 | 65 74 42 75 74 74 6f 6e |me def S|etButton|
|00000290| 44 61 74 61 28 20 62 74 | 6e 49 44 20 61 73 20 6c |Data( bt|nID as l|
|000002a0| 6f 6e 67 2c 20 70 61 72 | 74 20 61 73 20 73 68 6f |ong, par|t as sho|
|000002b0| 72 74 2c 20 74 61 67 4e | 61 6d 65 20 61 73 20 52 |rt, tagN|ame as R|
|000002c0| 65 73 54 79 70 65 2c 20 | 73 69 7a 65 20 61 73 20 |esType, |size as |
|000002d0| 6c 6f 6e 67 2c 20 40 64 | 50 74 72 20 61 73 20 70 |long, @d|Ptr as p|
|000002e0| 74 72 20 29 0d 27 7e 27 | 31 0d 64 69 6d 20 63 20 |tr ).'~'|1.dim c |
|000002f0| 20 20 20 20 61 73 20 43 | 6f 6e 74 72 6f 6c 52 65 | as C|ontrolRe|
|00000300| 66 0d 64 69 6d 20 65 72 | 72 20 20 20 61 73 20 4f |f.dim er|r as O|
|00000310| 53 45 72 72 0d 63 20 3d | 20 62 75 74 74 6f 6e 26 |SErr.c =| button&|
|00000320| 28 20 62 74 6e 49 44 20 | 29 0d 6c 6f 6e 67 20 69 |( btnID |).long i|
|00000330| 66 20 63 0d 65 72 72 20 | 3d 20 66 6e 20 53 65 74 |f c.err |= fn Set|
|00000340| 43 6f 6e 74 72 6f 6c 44 | 61 74 61 28 20 63 2c 20 |ControlD|ata( c, |
|00000350| 70 61 72 74 2c 20 74 61 | 67 4e 61 6d 65 2c 20 73 |part, ta|gName, s|
|00000360| 69 7a 65 2c 20 23 64 50 | 74 72 20 29 0d 6c 6f 6e |ize, #dP|tr ).lon|
|00000370| 67 20 69 66 20 65 72 72 | 0d 66 6e 20 52 75 6e 74 |g if err|.fn Runt|
|00000380| 69 6d 65 45 72 72 4d 73 | 67 28 20 22 53 65 74 42 |imeErrMs|g( "SetB|
|00000390| 75 74 74 6f 6e 44 61 74 | 61 20 65 72 72 6f 72 20 |uttonDat|a error |
|000003a0| 22 20 2b 20 73 74 72 24 | 28 20 65 72 72 20 29 20 |" + str$|( err ) |
|000003b0| 2b 20 22 20 66 6f 72 20 | 62 75 74 74 6f 6e 22 20 |+ " for |button" |
|000003c0| 2b 20 73 74 72 24 28 20 | 62 74 6e 49 44 20 29 20 |+ str$( |btnID ) |
|000003d0| 29 0d 78 65 6c 73 65 0d | 66 6e 20 44 72 61 77 4f |).xelse.|fn DrawO|
|000003e0| 6e 65 43 6f 6e 74 72 6f | 6c 41 6e 64 56 61 6c 69 |neContro|lAndVali|
|000003f0| 64 61 74 65 52 65 63 74 | 28 20 63 20 29 0d 2f 2f |dateRect|( c ).//|
|00000400| 44 72 61 77 4f 6e 65 43 | 6f 6e 74 72 6f 6c 28 20 |DrawOneC|ontrol( |
|00000410| 63 20 29 0d 65 6e 64 20 | 69 66 0d 65 6e 64 20 69 |c ).end |if.end i|
|00000420| 66 0d 65 6e 64 20 66 6e | 0d 0d 0d 2f 2f 20 73 65 |f.end fn|...// se|
|00000430| 74 20 63 6f 6e 74 72 6f | 6c 27 73 20 74 65 78 74 |t contro|l's text|
|00000440| 20 74 6f 20 73 2c 20 74 | 68 65 6e 20 72 65 64 72 | to s, t|hen redr|
|00000450| 61 77 20 69 74 0d 72 75 | 6e 74 69 6d 65 20 64 65 |aw it.ru|ntime de|
|00000460| 66 20 53 65 74 42 75 74 | 74 6f 6e 54 65 78 74 53 |f SetBut|tonTextS|
|00000470| 74 72 69 6e 67 28 20 62 | 74 6e 49 44 20 61 73 20 |tring( b|tnID as |
|00000480| 6c 6f 6e 67 2c 20 73 20 | 61 73 20 73 74 72 32 35 |long, s |as str25|
|00000490| 35 20 29 0d 27 7e 27 31 | 0d 64 69 6d 20 63 20 20 |5 ).'~'1|.dim c |
|000004a0| 20 20 20 61 73 20 43 6f | 6e 74 72 6f 6c 52 65 66 | as Co|ntrolRef|
|000004b0| 0d 64 69 6d 20 65 72 72 | 20 20 20 61 73 20 4f 53 |.dim err| as OS|
|000004c0| 45 72 72 0d 63 20 3d 20 | 62 75 74 74 6f 6e 26 28 |Err.c = |button&(|
|000004d0| 20 62 74 6e 49 44 20 29 | 0d 6c 6f 6e 67 20 69 66 | btnID )|.long if|
|000004e0| 20 63 0d 65 72 72 20 3d | 20 66 6e 20 53 65 74 43 | c.err =| fn SetC|
|000004f0| 6f 6e 74 72 6f 6c 44 61 | 74 61 28 20 63 2c 20 5f |ontrolDa|ta( c, _|
|00000500| 6b 43 6f 6e 74 72 6f 6c | 45 64 69 74 54 65 78 74 |kControl|EditText|
|00000510| 50 61 72 74 2c 20 5f 6b | 43 6f 6e 74 72 6f 6c 45 |Part, _k|ControlE|
|00000520| 64 69 74 54 65 78 74 54 | 65 78 74 54 61 67 2c 20 |ditTextT|extTag, |
|00000530| 73 5b 30 5d 2c 20 73 5b | 31 5d 20 29 20 0d 6c 6f |s[0], s[|1] ) .lo|
|00000540| 6e 67 20 69 66 20 65 72 | 72 0d 66 6e 20 52 75 6e |ng if er|r.fn Run|
|00000550| 74 69 6d 65 45 72 72 4d | 73 67 28 20 22 53 65 74 |timeErrM|sg( "Set|
|00000560| 42 75 74 74 6f 6e 54 65 | 78 74 53 74 72 69 6e 67 |ButtonTe|xtString|
|00000570| 20 65 72 72 6f 72 20 22 | 20 2b 20 73 74 72 24 28 | error "| + str$(|
|00000580| 20 65 72 72 20 29 20 2b | 20 22 20 66 6f 72 20 62 | err ) +| " for b|
|00000590| 75 74 74 6f 6e 22 20 2b | 20 73 74 72 24 28 20 62 |utton" +| str$( b|
|000005a0| 74 6e 49 44 20 29 20 29 | 0d 78 65 6c 73 65 0d 66 |tnID ) )|.xelse.f|
|000005b0| 6e 20 44 72 61 77 4f 6e | 65 43 6f 6e 74 72 6f 6c |n DrawOn|eControl|
|000005c0| 41 6e 64 56 61 6c 69 64 | 61 74 65 52 65 63 74 28 |AndValid|ateRect(|
|000005d0| 20 63 20 29 0d 2f 2f 44 | 72 61 77 4f 6e 65 43 6f | c ).//D|rawOneCo|
|000005e0| 6e 74 72 6f 6c 28 20 63 | 20 29 0d 65 6e 64 20 69 |ntrol( c| ).end i|
|000005f0| 66 0d 65 6e 64 20 69 66 | 0d 65 6e 64 20 66 6e 0d |f.end if|.end fn.|
|00000600| 0d 0d 2f 2f 20 67 65 74 | 20 75 70 20 74 6f 20 32 |..// get| up to 2|
|00000610| 35 35 20 63 68 61 72 73 | 20 6f 66 20 63 6f 6e 74 |55 chars| of cont|
|00000620| 72 6f 6c 27 73 20 74 65 | 78 74 2e 20 20 20 6d 79 |rol's te|xt. my|
|00000630| 53 74 72 69 6e 67 20 3d | 20 66 6e 20 42 75 74 74 |String =| fn Butt|
|00000640| 6f 6e 54 65 78 74 53 74 | 72 69 6e 67 24 28 20 62 |onTextSt|ring$( b|
|00000650| 74 6e 49 44 20 29 0d 6c | 6f 63 61 6c 20 66 6e 20 |tnID ).l|ocal fn |
|00000660| 42 75 74 74 6f 6e 54 65 | 78 74 53 74 72 69 6e 67 |ButtonTe|xtString|
|00000670| 24 28 20 62 74 6e 49 44 | 20 61 73 20 6c 6f 6e 67 |$( btnID| as long|
|00000680| 20 29 0d 27 7e 27 31 0d | 64 69 6d 20 63 20 20 20 | ).'~'1.|dim c |
|00000690| 20 20 20 20 20 61 73 20 | 43 6f 6e 74 72 6f 6c 52 | as |ControlR|
|000006a0| 65 66 0d 64 69 6d 20 40 | 20 61 63 74 75 61 6c 20 |ef.dim @| actual |
|000006b0| 61 73 20 6c 6f 6e 67 0d | 64 69 6d 20 65 72 72 20 |as long.|dim err |
|000006c0| 20 20 20 20 20 61 73 20 | 4f 53 45 72 72 0d 64 69 | as |OSErr.di|
|000006d0| 6d 20 73 20 20 20 20 20 | 20 20 20 61 73 20 73 74 |m s | as st|
|000006e0| 72 32 35 35 0d 73 5b 30 | 5d 20 3d 20 30 0d 63 20 |r255.s[0|] = 0.c |
|000006f0| 3d 20 62 75 74 74 6f 6e | 26 28 20 62 74 6e 49 44 |= button|&( btnID|
|00000700| 20 29 0d 6c 6f 6e 67 20 | 69 66 20 63 0d 65 72 72 | ).long |if c.err|
|00000710| 20 3d 20 66 6e 20 47 65 | 74 43 6f 6e 74 72 6f 6c | = fn Ge|tControl|
|00000720| 44 61 74 61 28 20 63 2c | 20 5f 6b 43 6f 6e 74 72 |Data( c,| _kContr|
|00000730| 6f 6c 45 64 69 74 54 65 | 78 74 50 61 72 74 2c 20 |olEditTe|xtPart, |
|00000740| 5f 6b 43 6f 6e 74 72 6f | 6c 45 64 69 74 54 65 78 |_kContro|lEditTex|
|00000750| 74 54 65 78 74 54 61 67 | 2c 20 32 35 35 2c 20 73 |tTextTag|, 255, s|
|00000760| 5b 31 5d 2c 20 61 63 74 | 75 61 6c 20 29 20 0d 6c |[1], act|ual ) .l|
|00000770| 6f 6e 67 20 69 66 20 65 | 72 72 0d 66 6e 20 52 75 |ong if e|rr.fn Ru|
|00000780| 6e 74 69 6d 65 45 72 72 | 4d 73 67 28 20 22 42 75 |ntimeErr|Msg( "Bu|
|00000790| 74 74 6f 6e 54 65 78 74 | 53 74 72 69 6e 67 24 20 |ttonText|String$ |
|000007a0| 65 72 72 6f 72 20 22 20 | 2b 20 73 74 72 24 28 20 |error " |+ str$( |
|000007b0| 65 72 72 20 29 20 2b 20 | 22 20 66 6f 72 20 62 75 |err ) + |" for bu|
|000007c0| 74 74 6f 6e 22 20 2b 20 | 73 74 72 24 28 20 62 74 |tton" + |str$( bt|
|000007d0| 6e 49 44 20 29 20 29 0d | 78 65 6c 73 65 0d 69 66 |nID ) ).|xelse.if|
|000007e0| 20 61 63 74 75 61 6c 20 | 3c 20 32 35 35 20 74 68 | actual |< 255 th|
|000007f0| 65 6e 20 73 5b 30 5d 20 | 3d 20 61 63 74 75 61 6c |en s[0] |= actual|
|00000800| 20 65 6c 73 65 20 73 5b | 30 5d 20 3d 20 32 35 35 | else s[|0] = 255|
|00000810| 0d 65 6e 64 20 69 66 0d | 65 6e 64 20 69 66 0d 65 |.end if.|end if.e|
|00000820| 6e 64 20 66 6e 20 3d 20 | 73 0d 0d 2f 2f 20 6a 75 |nd fn = |s..// ju|
|00000830| 73 74 20 61 20 77 72 61 | 70 70 65 72 20 66 6f 72 |st a wra|pper for|
|00000840| 20 47 65 74 43 6f 6e 74 | 72 6f 6c 44 61 74 61 2c | GetCont|rolData,|
|00000850| 20 77 69 74 68 20 62 74 | 6e 49 44 0d 72 75 6e 74 | with bt|nID.runt|
|00000860| 69 6d 65 20 64 65 66 20 | 47 65 74 42 75 74 74 6f |ime def |GetButto|
|00000870| 6e 44 61 74 61 28 20 62 | 74 6e 49 44 20 61 73 20 |nData( b|tnID as |
|00000880| 6c 6f 6e 67 2c 20 70 61 | 72 74 20 61 73 20 73 68 |long, pa|rt as sh|
|00000890| 6f 72 74 2c 20 74 61 67 | 4e 61 6d 65 20 61 73 20 |ort, tag|Name as |
|000008a0| 52 65 73 54 79 70 65 2c | 20 6d 61 78 53 69 7a 65 |ResType,| maxSize|
|000008b0| 20 61 73 20 6c 6f 6e 67 | 2c 20 40 64 50 74 72 20 | as long|, @dPtr |
|000008c0| 61 73 20 70 74 72 2c 20 | 40 61 63 74 53 69 7a 65 |as ptr, |@actSize|
|000008d0| 20 61 73 20 5e 6c 6f 6e | 67 20 29 0d 27 7e 27 31 | as ^lon|g ).'~'1|
|000008e0| 0d 64 69 6d 20 63 20 20 | 20 20 20 61 73 20 43 6f |.dim c | as Co|
|000008f0| 6e 74 72 6f 6c 52 65 66 | 0d 64 69 6d 20 65 72 72 |ntrolRef|.dim err|
|00000900| 20 20 20 61 73 20 4f 53 | 45 72 72 0d 63 20 3d 20 | as OS|Err.c = |
|00000910| 62 75 74 74 6f 6e 26 28 | 20 62 74 6e 49 44 20 29 |button&(| btnID )|
|00000920| 0d 6c 6f 6e 67 20 69 66 | 20 63 0d 65 72 72 20 3d |.long if| c.err =|
|00000930| 20 66 6e 20 47 65 74 43 | 6f 6e 74 72 6f 6c 44 61 | fn GetC|ontrolDa|
|00000940| 74 61 28 20 63 2c 20 70 | 61 72 74 2c 20 74 61 67 |ta( c, p|art, tag|
|00000950| 4e 61 6d 65 2c 20 6d 61 | 78 53 69 7a 65 2c 20 23 |Name, ma|xSize, #|
|00000960| 64 50 74 72 2c 20 23 61 | 63 74 53 69 7a 65 20 29 |dPtr, #a|ctSize )|
|00000970| 0d 69 66 20 65 72 72 20 | 74 68 65 6e 20 66 6e 20 |.if err |then fn |
|00000980| 52 75 6e 74 69 6d 65 45 | 72 72 4d 73 67 28 20 22 |RuntimeE|rrMsg( "|
|00000990| 47 65 74 42 75 74 74 6f | 6e 44 61 74 61 20 65 72 |GetButto|nData er|
|000009a0| 72 6f 72 20 22 20 2b 20 | 73 74 72 24 28 20 65 72 |ror " + |str$( er|
|000009b0| 72 20 29 20 2b 20 22 20 | 66 6f 72 20 62 75 74 74 |r ) + " |for butt|
|000009c0| 6f 6e 22 20 2b 20 73 74 | 72 24 28 20 62 74 6e 49 |on" + st|r$( btnI|
|000009d0| 44 20 29 20 29 0d 65 6e | 64 20 69 66 0d 65 6e 64 |D ) ).en|d if.end|
|000009e0| 20 66 6e 0d 0d 2f 2f 20 | 6a 75 73 74 20 61 20 77 | fn..// |just a w|
|000009f0| 72 61 70 70 65 72 20 66 | 6f 72 20 47 65 74 43 6f |rapper f|or GetCo|
|00000a00| 6e 74 72 6f 6c 44 61 74 | 61 53 69 7a 65 2c 20 77 |ntrolDat|aSize, w|
|00000a10| 69 74 68 20 62 74 6e 49 | 44 2e 20 20 20 61 63 74 |ith btnI|D. act|
|00000a20| 53 69 7a 65 20 3d 20 66 | 6e 20 42 75 74 74 6f 6e |Size = f|n Button|
|00000a30| 44 61 74 61 53 69 7a 65 | 28 62 74 6e 49 44 2c 70 |DataSize|(btnID,p|
|00000a40| 61 72 74 2c 74 61 67 4e | 61 6d 65 29 0d 6c 6f 63 |art,tagN|ame).loc|
|00000a50| 61 6c 20 66 6e 20 42 75 | 74 74 6f 6e 44 61 74 61 |al fn Bu|ttonData|
|00000a60| 53 69 7a 65 28 20 62 74 | 6e 49 44 20 61 73 20 6c |Size( bt|nID as l|
|00000a70| 6f 6e 67 2c 20 70 61 72 | 74 20 61 73 20 73 68 6f |ong, par|t as sho|
|00000a80| 72 74 2c 20 74 61 67 4e | 61 6d 65 20 61 73 20 52 |rt, tagN|ame as R|
|00000a90| 65 73 54 79 70 65 29 0d | 27 7e 27 31 0d 64 69 6d |esType).|'~'1.dim|
|00000aa0| 20 63 20 20 20 20 20 20 | 20 20 20 61 73 20 43 6f | c | as Co|
|00000ab0| 6e 74 72 6f 6c 52 65 66 | 0d 64 69 6d 20 40 20 61 |ntrolRef|.dim @ a|
|00000ac0| 63 74 53 69 7a 65 20 61 | 73 20 6c 6f 6e 67 20 0d |ctSize a|s long .|
|00000ad0| 64 69 6d 20 65 72 72 20 | 20 20 20 20 20 20 61 73 |dim err | as|
|00000ae0| 20 4f 53 45 72 72 0d 61 | 63 74 53 69 7a 65 20 3d | OSErr.a|ctSize =|
|00000af0| 20 30 0d 63 20 3d 20 62 | 75 74 74 6f 6e 26 28 20 | 0.c = b|utton&( |
|00000b00| 62 74 6e 49 44 20 29 0d | 6c 6f 6e 67 20 69 66 20 |btnID ).|long if |
|00000b10| 63 0d 65 72 72 20 3d 20 | 66 6e 20 47 65 74 43 6f |c.err = |fn GetCo|
|00000b20| 6e 74 72 6f 6c 44 61 74 | 61 53 69 7a 65 28 20 63 |ntrolDat|aSize( c|
|00000b30| 2c 20 70 61 72 74 2c 20 | 74 61 67 4e 61 6d 65 2c |, part, |tagName,|
|00000b40| 20 40 61 63 74 53 69 7a | 65 20 29 0d 69 66 20 65 | @actSiz|e ).if e|
|00000b50| 72 72 20 74 68 65 6e 20 | 66 6e 20 52 75 6e 74 69 |rr then |fn Runti|
|00000b60| 6d 65 45 72 72 4d 73 67 | 28 20 22 42 75 74 74 6f |meErrMsg|( "Butto|
|00000b70| 6e 44 61 74 61 53 69 7a | 65 20 65 72 72 6f 72 20 |nDataSiz|e error |
|00000b80| 22 20 2b 20 73 74 72 24 | 28 20 65 72 72 20 29 20 |" + str$|( err ) |
|00000b90| 2b 20 22 20 66 6f 72 20 | 62 75 74 74 6f 6e 22 20 |+ " for |button" |
|00000ba0| 2b 20 73 74 72 24 28 20 | 62 74 6e 49 44 20 29 20 |+ str$( |btnID ) |
|00000bb0| 29 0d 65 6e 64 20 69 66 | 0d 65 6e 64 20 66 6e 20 |).end if|.end fn |
|00000bc0| 3d 20 61 63 74 53 69 7a | 65 0d 0d 0d 2f 2f 20 73 |= actSiz|e...// s|
|00000bd0| 65 74 20 62 75 74 74 6f | 6e 27 73 20 74 65 78 74 |et butto|n's text|
|00000be0| 20 73 65 6c 65 63 74 69 | 6f 6e 20 61 6e 64 20 72 | selecti|on and r|
|00000bf0| 65 64 72 61 77 0d 72 75 | 6e 74 69 6d 65 20 64 65 |edraw.ru|ntime de|
|00000c00| 66 20 53 65 74 42 75 74 | 74 6f 6e 54 65 78 74 53 |f SetBut|tonTextS|
|00000c10| 65 6c 65 63 74 69 6f 6e | 28 20 62 74 6e 49 44 20 |election|( btnID |
|00000c20| 61 73 20 6c 6f 6e 67 2c | 20 73 65 6c 53 74 61 72 |as long,| selStar|
|00000c30| 74 20 61 73 20 73 68 6f | 72 74 2c 20 73 65 6c 45 |t as sho|rt, selE|
|00000c40| 6e 64 20 61 73 20 73 68 | 6f 72 74 20 29 0d 27 7e |nd as sh|ort ).'~|
|00000c50| 27 31 0d 64 69 6d 20 63 | 20 20 20 20 20 20 20 20 |'1.dim c| |
|00000c60| 20 61 73 20 43 6f 6e 74 | 72 6f 6c 52 65 66 0d 64 | as Cont|rolRef.d|
|00000c70| 69 6d 20 73 65 6c 65 63 | 74 69 6f 6e 20 61 73 20 |im selec|tion as |
|00000c80| 43 6f 6e 74 72 6f 6c 45 | 64 69 74 54 65 78 74 53 |ControlE|ditTextS|
|00000c90| 65 6c 65 63 74 69 6f 6e | 52 65 63 0d 64 69 6d 20 |election|Rec.dim |
|00000ca0| 65 72 72 20 20 20 20 20 | 20 20 61 73 20 4f 53 45 |err | as OSE|
|00000cb0| 72 72 0d 63 20 3d 20 62 | 75 74 74 6f 6e 26 28 20 |rr.c = b|utton&( |
|00000cc0| 62 74 6e 49 44 20 29 0d | 6c 6f 6e 67 20 69 66 20 |btnID ).|long if |
|00000cd0| 63 0d 73 65 6c 65 63 74 | 69 6f 6e 2e 73 65 6c 53 |c.select|ion.selS|
|00000ce0| 74 61 72 74 20 3d 20 73 | 65 6c 53 74 61 72 74 0d |tart = s|elStart.|
|00000cf0| 73 65 6c 65 63 74 69 6f | 6e 2e 73 65 6c 45 6e 64 |selectio|n.selEnd|
|00000d00| 20 20 20 3d 20 73 65 6c | 45 6e 64 0d 65 72 72 20 | = sel|End.err |
|00000d10| 3d 20 66 6e 20 53 65 74 | 43 6f 6e 74 72 6f 6c 44 |= fn Set|ControlD|
|00000d20| 61 74 61 28 20 63 2c 20 | 30 2c 20 5f 6b 43 6f 6e |ata( c, |0, _kCon|
|00000d30| 74 72 6f 6c 45 64 69 74 | 54 65 78 74 53 65 6c 65 |trolEdit|TextSele|
|00000d40| 63 74 69 6f 6e 54 61 67 | 2c 20 73 69 7a 65 6f 66 |ctionTag|, sizeof|
|00000d50| 28 20 73 65 6c 65 63 74 | 69 6f 6e 20 29 2c 20 40 |( select|ion ), @|
|00000d60| 73 65 6c 65 63 74 69 6f | 6e 20 29 0d 6c 6f 6e 67 |selectio|n ).long|
|00000d70| 20 69 66 20 65 72 72 0d | 66 6e 20 52 75 6e 74 69 | if err.|fn Runti|
|00000d80| 6d 65 45 72 72 4d 73 67 | 28 20 22 53 65 74 42 75 |meErrMsg|( "SetBu|
|00000d90| 74 74 6f 6e 54 65 78 74 | 53 65 6c 65 63 74 69 6f |ttonText|Selectio|
|00000da0| 6e 20 65 72 72 6f 72 20 | 22 20 2b 20 73 74 72 24 |n error |" + str$|
|00000db0| 28 20 65 72 72 20 29 20 | 2b 20 22 20 66 6f 72 20 |( err ) |+ " for |
|00000dc0| 62 75 74 74 6f 6e 22 20 | 2b 20 73 74 72 24 28 20 |button" |+ str$( |
|00000dd0| 62 74 6e 49 44 20 29 20 | 29 0d 78 65 6c 73 65 0d |btnID ) |).xelse.|
|00000de0| 66 6e 20 44 72 61 77 4f | 6e 65 43 6f 6e 74 72 6f |fn DrawO|neContro|
|00000df0| 6c 41 6e 64 56 61 6c 69 | 64 61 74 65 52 65 63 74 |lAndVali|dateRect|
|00000e00| 28 20 63 20 29 0d 2f 2f | 44 72 61 77 4f 6e 65 43 |( c ).//|DrawOneC|
|00000e10| 6f 6e 74 72 6f 6c 28 20 | 63 20 29 0d 65 6e 64 20 |ontrol( |c ).end |
|00000e20| 69 66 0d 65 6e 64 20 69 | 66 0d 65 6e 64 20 66 6e |if.end i|f.end fn|
|00000e30| 0d 0d 2f 2f 20 67 65 74 | 20 62 75 74 74 6f 6e 27 |..// get| button'|
|00000e40| 73 20 74 65 78 74 20 73 | 65 6c 65 63 74 69 6f 6e |s text s|election|
|00000e50| 0d 72 75 6e 74 69 6d 65 | 20 64 65 66 20 47 65 74 |.runtime| def Get|
|00000e60| 42 75 74 74 6f 6e 54 65 | 78 74 53 65 6c 65 63 74 |ButtonTe|xtSelect|
|00000e70| 69 6f 6e 28 20 62 74 6e | 49 44 20 61 73 20 6c 6f |ion( btn|ID as lo|
|00000e80| 6e 67 2c 20 40 73 65 6c | 53 74 61 72 74 20 61 73 |ng, @sel|Start as|
|00000e90| 20 5e 73 68 6f 72 74 2c | 20 40 73 65 6c 45 6e 64 | ^short,| @selEnd|
|00000ea0| 20 61 73 20 5e 73 68 6f | 72 74 20 29 0d 27 7e 27 | as ^sho|rt ).'~'|
|00000eb0| 31 0d 64 69 6d 20 63 20 | 20 20 20 20 61 73 20 43 |1.dim c | as C|
|00000ec0| 6f 6e 74 72 6f 6c 52 65 | 66 0d 64 69 6d 20 73 65 |ontrolRe|f.dim se|
|00000ed0| 6c 65 63 74 69 6f 6e 20 | 61 73 20 43 6f 6e 74 72 |lection |as Contr|
|00000ee0| 6f 6c 45 64 69 74 54 65 | 78 74 53 65 6c 65 63 74 |olEditTe|xtSelect|
|00000ef0| 69 6f 6e 52 65 63 0d 64 | 69 6d 20 65 72 72 20 20 |ionRec.d|im err |
|00000f00| 20 20 20 20 20 61 73 20 | 4f 53 45 72 72 0d 64 69 | as |OSErr.di|
|00000f10| 6d 20 40 20 61 63 74 75 | 61 6c 20 20 61 73 20 6c |m @ actu|al as l|
|00000f20| 6f 6e 67 0d 63 20 3d 20 | 62 75 74 74 6f 6e 26 28 |ong.c = |button&(|
|00000f30| 20 62 74 6e 49 44 20 29 | 0d 6c 6f 6e 67 20 69 66 | btnID )|.long if|
|00000f40| 20 63 0d 6c 6f 6e 67 20 | 69 66 20 73 65 6c 53 74 | c.long |if selSt|
|00000f50| 61 72 74 0d 6c 6f 6e 67 | 20 69 66 20 73 65 6c 45 |art.long| if selE|
|00000f60| 6e 64 0d 65 72 72 20 3d | 20 66 6e 20 47 65 74 43 |nd.err =| fn GetC|
|00000f70| 6f 6e 74 72 6f 6c 44 61 | 74 61 28 20 63 2c 20 30 |ontrolDa|ta( c, 0|
|00000f80| 2c 20 5f 6b 43 6f 6e 74 | 72 6f 6c 45 64 69 74 54 |, _kCont|rolEditT|
|00000f90| 65 78 74 53 65 6c 65 63 | 74 69 6f 6e 54 61 67 2c |extSelec|tionTag,|
|00000fa0| 20 73 69 7a 65 6f 66 28 | 20 73 65 6c 65 63 74 69 | sizeof(| selecti|
|00000fb0| 6f 6e 20 29 2c 20 40 73 | 65 6c 65 63 74 69 6f 6e |on ), @s|election|
|00000fc0| 2c 20 40 61 63 74 75 61 | 6c 20 29 0d 6c 6f 6e 67 |, @actua|l ).long|
|00000fd0| 20 69 66 20 65 72 72 0d | 66 6e 20 52 75 6e 74 69 | if err.|fn Runti|
|00000fe0| 6d 65 45 72 72 4d 73 67 | 28 20 22 47 65 74 42 75 |meErrMsg|( "GetBu|
|00000ff0| 74 74 6f 6e 54 65 78 74 | 53 65 6c 65 63 74 69 6f |ttonText|Selectio|
|00001000| 6e 20 65 72 72 6f 72 20 | 22 20 2b 20 73 74 72 24 |n error |" + str$|
|00001010| 28 20 65 72 72 20 29 20 | 2b 20 22 20 66 6f 72 20 |( err ) |+ " for |
|00001020| 62 75 74 74 6f 6e 22 20 | 2b 20 73 74 72 24 28 20 |button" |+ str$( |
|00001030| 62 74 6e 49 44 20 29 20 | 29 0d 78 65 6c 73 65 0d |btnID ) |).xelse.|
|00001040| 73 65 6c 53 74 61 72 74 | 2e 6e 69 6c 25 20 3d 20 |selStart|.nil% = |
|00001050| 73 65 6c 65 63 74 69 6f | 6e 2e 73 65 6c 53 74 61 |selectio|n.selSta|
|00001060| 72 74 0d 73 65 6c 45 6e | 64 2e 6e 69 6c 25 20 20 |rt.selEn|d.nil% |
|00001070| 20 3d 20 73 65 6c 65 63 | 74 69 6f 6e 2e 73 65 6c | = selec|tion.sel|
|00001080| 45 6e 64 0d 65 6e 64 20 | 69 66 0d 65 6e 64 20 69 |End.end |if.end i|
|00001090| 66 0d 65 6e 64 20 69 66 | 0d 65 6e 64 20 69 66 0d |f.end if|.end if.|
|000010a0| 65 6e 64 20 66 6e 0d 0d | 2f 2a 0d 62 65 67 69 6e |end fn..|/*.begin|
|000010b0| 20 72 65 63 6f 72 64 20 | 43 6f 6e 74 72 6f 6c 46 | record |ControlF|
|000010c0| 6f 6e 74 53 74 79 6c 65 | 52 65 63 0d 64 69 6d 20 |ontStyle|Rec.dim |
|000010d0| 66 6c 61 67 73 20 20 20 | 20 20 61 73 20 73 68 6f |flags | as sho|
|000010e0| 72 74 0d 64 69 6d 20 66 | 6f 6e 74 20 20 20 20 20 |rt.dim f|ont |
|000010f0| 20 61 73 20 73 68 6f 72 | 74 0d 64 69 6d 20 73 69 | as shor|t.dim si|
|00001100| 7a 65 20 20 20 20 20 20 | 61 73 20 73 68 6f 72 74 |ze |as short|
|00001110| 0d 64 69 6d 20 73 74 79 | 6c 65 20 20 20 20 20 61 |.dim sty|le a|
|00001120| 73 20 73 68 6f 72 74 0d | 64 69 6d 20 6d 6f 64 65 |s short.|dim mode|
|00001130| 20 20 20 20 20 20 61 73 | 20 73 68 6f 72 74 0d 64 | as| short.d|
|00001140| 69 6d 20 6a 75 73 74 20 | 20 20 20 20 20 61 73 20 |im just | as |
|00001150| 73 68 6f 72 74 0d 64 69 | 6d 20 66 6f 72 65 43 6f |short.di|m foreCo|
|00001160| 6c 6f 72 20 61 73 20 52 | 47 42 43 6f 6c 6f 72 0d |lor as R|GBColor.|
|00001170| 64 69 6d 20 62 61 63 6b | 43 6f 6c 6f 72 20 61 73 |dim back|Color as|
|00001180| 20 52 47 42 43 6f 6c 6f | 72 0d 65 6e 64 20 72 65 | RGBColo|r.end re|
|00001190| 63 6f 72 64 0d 0d 5f 6b | 43 6f 6e 74 72 6f 6c 55 |cord.._k|ControlU|
|000011a0| 73 65 46 6f 6e 74 4d 61 | 73 6b 0d 5f 6b 43 6f 6e |seFontMa|sk._kCon|
|000011b0| 74 72 6f 6c 55 73 65 46 | 61 63 65 4d 61 73 6b 0d |trolUseF|aceMask.|
|000011c0| 5f 6b 43 6f 6e 74 72 6f | 6c 55 73 65 53 69 7a 65 |_kContro|lUseSize|
|000011d0| 4d 61 73 6b 0d 5f 6b 43 | 6f 6e 74 72 6f 6c 55 73 |Mask._kC|ontrolUs|
|000011e0| 65 46 6f 72 65 43 6f 6c | 6f 72 4d 61 73 6b 0d 5f |eForeCol|orMask._|
|000011f0| 6b 43 6f 6e 74 72 6f 6c | 55 73 65 42 61 63 6b 43 |kControl|UseBackC|
|00001200| 6f 6c 6f 72 4d 61 73 6b | 0d 5f 6b 43 6f 6e 74 72 |olorMask|._kContr|
|00001210| 6f 6c 55 73 65 4d 6f 64 | 65 4d 61 73 6b 0d 5f 6b |olUseMod|eMask._k|
|00001220| 43 6f 6e 74 72 6f 6c 55 | 73 65 4a 75 73 74 4d 61 |ControlU|seJustMa|
|00001230| 73 6b 0d 0d 2a 2f 0d 72 | 75 6e 74 69 6d 65 20 64 |sk..*/.r|untime d|
|00001240| 65 66 20 53 65 74 42 75 | 74 74 6f 6e 46 6f 6e 74 |ef SetBu|ttonFont|
|00001250| 53 74 79 6c 65 28 20 62 | 74 6e 49 44 20 61 73 20 |Style( b|tnID as |
|00001260| 6c 6f 6e 67 2c 20 40 63 | 66 73 20 61 73 20 5e 43 |long, @c|fs as ^C|
|00001270| 6f 6e 74 72 6f 6c 46 6f | 6e 74 53 74 79 6c 65 52 |ontrolFo|ntStyleR|
|00001280| 65 63 20 29 0d 64 69 6d | 20 63 20 20 20 20 20 61 |ec ).dim| c a|
|00001290| 73 20 43 6f 6e 74 72 6f | 6c 52 65 66 0d 64 69 6d |s Contro|lRef.dim|
|000012a0| 20 65 72 72 20 20 20 61 | 73 20 4f 53 45 72 72 0d | err a|s OSErr.|
|000012b0| 63 20 3d 20 62 75 74 74 | 6f 6e 26 28 20 62 74 6e |c = butt|on&( btn|
|000012c0| 49 44 20 29 0d 6c 6f 6e | 67 20 69 66 20 63 0d 65 |ID ).lon|g if c.e|
|000012d0| 72 72 20 3d 20 66 6e 20 | 53 65 74 43 6f 6e 74 72 |rr = fn |SetContr|
|000012e0| 6f 6c 46 6f 6e 74 53 74 | 79 6c 65 28 20 63 2c 20 |olFontSt|yle( c, |
|000012f0| 23 63 66 73 20 29 0d 69 | 66 20 65 72 72 20 74 68 |#cfs ).i|f err th|
|00001300| 65 6e 20 66 6e 20 52 75 | 6e 74 69 6d 65 45 72 72 |en fn Ru|ntimeErr|
|00001310| 4d 73 67 28 20 22 53 65 | 74 42 75 74 74 6f 6e 46 |Msg( "Se|tButtonF|
|00001320| 6f 6e 74 53 74 79 6c 65 | 20 65 72 72 6f 72 20 22 |ontStyle| error "|
|00001330| 20 2b 20 73 74 72 24 28 | 20 65 72 72 20 29 20 2b | + str$(| err ) +|
|00001340| 20 22 20 66 6f 72 20 62 | 75 74 74 6f 6e 22 20 2b | " for b|utton" +|
|00001350| 20 73 74 72 24 28 20 62 | 74 6e 49 44 20 29 20 29 | str$( b|tnID ) )|
|00001360| 0d 65 6e 64 20 69 66 0d | 65 6e 64 20 66 6e 0d 0d |.end if.|end fn..|
|00001370| 0d 2f 2f 20 43 61 6c 6c | 65 64 20 66 72 6f 6d 3a |.// Call|ed from:|
|00001380| 20 78 20 3d 20 42 55 54 | 54 4f 4e 20 74 6f 20 72 | x = BUT|TON to r|
|00001390| 65 74 75 72 6e 20 6c 61 | 73 74 20 62 75 74 74 6f |eturn la|st butto|
|000013a0| 6e 20 76 61 6c 75 65 20 | 28 62 65 66 6f 72 65 20 |n value |(before |
|000013b0| 74 72 61 63 6b 20 63 6f | 6e 74 72 6f 6c 29 0d 72 |track co|ntrol).r|
|000013c0| 75 6e 74 69 6d 65 20 42 | 75 74 74 6f 6e 56 0d 65 |untime B|uttonV.e|
|000013d0| 6e 64 20 66 6e 20 3d 20 | 67 46 42 4c 61 73 74 42 |nd fn = |gFBLastB|
|000013e0| 75 74 74 6f 6e 0d 0d 0d | 0d 62 65 67 69 6e 20 72 |utton...|.begin r|
|000013f0| 65 63 6f 72 64 20 46 42 | 43 4c 69 73 74 45 6c 65 |ecord FB|CListEle|
|00001400| 6d 20 0d 64 69 6d 20 63 | 20 20 20 20 20 20 20 61 |m .dim c| a|
|00001410| 73 20 43 6f 6e 74 72 6f | 6c 52 65 66 0d 64 69 6d |s Contro|lRef.dim|
|00001420| 20 63 52 65 66 43 6f 6e | 20 61 73 20 68 6e 64 6c | cRefCon| as hndl|
|00001430| 0d 64 69 6d 20 71 4c 69 | 6e 6b 20 20 20 61 73 20 |.dim qLi|nk as |
|00001440| 68 6e 64 6c 0d 65 6e 64 | 20 72 65 63 6f 72 64 0d |hndl.end| record.|
|00001450| 0d 2f 2f 20 63 61 6c 6c | 20 77 68 65 6e 20 61 20 |.// call| when a |
|00001460| 63 6f 6e 74 72 6f 6c 20 | 69 73 20 63 72 65 61 74 |control |is creat|
|00001470| 65 64 0d 6c 6f 63 61 6c | 0d 64 69 6d 20 74 68 65 |ed.local|.dim the|
|00001480| 45 6c 65 6d 65 6e 74 48 | 20 20 20 20 20 61 73 20 |ElementH| as |
|00001490| 5e 5e 46 42 43 4c 69 73 | 74 45 6c 65 6d 20 20 0d |^^FBCLis|tElem .|
|000014a0| 64 69 6d 20 6e 65 77 4c | 61 73 74 45 6c 65 6d 65 |dim newL|astEleme|
|000014b0| 6e 74 48 20 61 73 20 5e | 5e 46 42 43 4c 69 73 74 |ntH as ^|^FBCList|
|000014c0| 45 6c 65 6d 20 20 0d 64 | 69 6d 20 70 72 65 63 45 |Elem .d|im precE|
|000014d0| 6c 65 6d 65 6e 74 48 20 | 20 20 20 61 73 20 5e 5e |lementH | as ^^|
|000014e0| 46 42 43 4c 69 73 74 45 | 6c 65 6d 20 20 0d 6c 6f |FBCListE|lem .lo|
|000014f0| 63 61 6c 20 66 6e 20 41 | 64 64 46 42 43 6f 6e 74 |cal fn A|ddFBCont|
|00001500| 72 6f 6c 54 6f 4c 69 73 | 74 28 20 77 52 65 66 43 |rolToLis|t( wRefC|
|00001510| 6f 6e 20 20 61 73 20 5e | 5e 46 42 77 69 6e 64 6f |on as ^|^FBwindo|
|00001520| 77 44 65 73 63 72 69 70 | 74 69 6f 6e 2c 20 63 20 |wDescrip|tion, c |
|00001530| 61 73 20 43 6f 6e 74 72 | 6f 6c 52 65 66 2c 20 63 |as Contr|olRef, c|
|00001540| 52 65 66 43 6f 6e 20 61 | 73 20 5e 5e 46 42 63 6f |RefCon a|s ^^FBco|
|00001550| 6e 74 72 6f 6c 44 65 73 | 63 72 69 70 74 69 6f 6e |ntrolDes|cription|
|00001560| 20 29 0d 27 7e 27 31 0d | 6e 65 77 4c 61 73 74 45 | ).'~'1.|newLastE|
|00001570| 6c 65 6d 65 6e 74 48 20 | 3d 20 66 6e 20 4e 65 77 |lementH |= fn New|
|00001580| 48 61 6e 64 6c 65 28 20 | 73 69 7a 65 6f 66 28 20 |Handle( |sizeof( |
|00001590| 46 42 43 4c 69 73 74 45 | 6c 65 6d 20 20 20 29 20 |FBCListE|lem ) |
|000015a0| 29 0d 6e 65 77 4c 61 73 | 74 45 6c 65 6d 65 6e 74 |).newLas|tElement|
|000015b0| 48 2e 2e 63 20 3d 20 63 | 0d 6e 65 77 4c 61 73 74 |H..c = c|.newLast|
|000015c0| 45 6c 65 6d 65 6e 74 48 | 2e 2e 63 52 65 66 43 6f |ElementH|..cRefCo|
|000015d0| 6e 20 3d 20 63 52 65 66 | 43 6f 6e 0d 6e 65 77 4c |n = cRef|Con.newL|
|000015e0| 61 73 74 45 6c 65 6d 65 | 6e 74 48 2e 2e 71 4c 69 |astEleme|ntH..qLi|
|000015f0| 6e 6b 20 3d 20 30 0d 70 | 72 65 63 45 6c 65 6d 65 |nk = 0.p|recEleme|
|00001600| 6e 74 48 20 3d 20 30 0d | 74 68 65 45 6c 65 6d 65 |ntH = 0.|theEleme|
|00001610| 6e 74 48 20 20 3d 20 77 | 52 65 66 43 6f 6e 2e 2e |ntH = w|RefCon..|
|00001620| 46 42 77 43 6f 6e 74 72 | 6f 6c 4c 69 73 74 0d 77 |FBwContr|olList.w|
|00001630| 68 69 6c 65 20 74 68 65 | 45 6c 65 6d 65 6e 74 48 |hile the|ElementH|
|00001640| 0d 70 72 65 63 45 6c 65 | 6d 65 6e 74 48 20 3d 20 |.precEle|mentH = |
|00001650| 74 68 65 45 6c 65 6d 65 | 6e 74 48 0d 74 68 65 45 |theEleme|ntH.theE|
|00001660| 6c 65 6d 65 6e 74 48 20 | 20 3d 20 74 68 65 45 6c |lementH | = theEl|
|00001670| 65 6d 65 6e 74 48 2e 2e | 71 4c 69 6e 6b 0d 77 65 |ementH..|qLink.we|
|00001680| 6e 64 0d 6c 6f 6e 67 20 | 69 66 20 70 72 65 63 45 |nd.long |if precE|
|00001690| 6c 65 6d 65 6e 74 48 20 | 3d 3d 20 30 20 2f 2f 20 |lementH |== 0 // |
|000016a0| 6c 69 73 74 20 77 61 73 | 20 65 6d 70 74 79 0d 77 |list was| empty.w|
|000016b0| 52 65 66 43 6f 6e 2e 2e | 46 42 77 43 6f 6e 74 72 |RefCon..|FBwContr|
|000016c0| 6f 6c 4c 69 73 74 20 3d | 20 6e 65 77 4c 61 73 74 |olList =| newLast|
|000016d0| 45 6c 65 6d 65 6e 74 48 | 0d 78 65 6c 73 65 0d 70 |ElementH|.xelse.p|
|000016e0| 72 65 63 45 6c 65 6d 65 | 6e 74 48 2e 2e 71 4c 69 |recEleme|ntH..qLi|
|000016f0| 6e 6b 20 3d 20 6e 65 77 | 4c 61 73 74 45 6c 65 6d |nk = new|LastElem|
|00001700| 65 6e 74 48 0d 65 6e 64 | 20 69 66 0d 65 6e 64 20 |entH.end| if.end |
|00001710| 66 6e 0d 0d 2f 2f 20 63 | 61 6c 6c 20 77 68 65 6e |fn..// c|all when|
|00001720| 20 61 20 63 6f 6e 74 72 | 6f 6c 20 69 73 20 64 69 | a contr|ol is di|
|00001730| 73 70 6f 73 65 64 20 6f | 66 0d 6c 6f 63 61 6c 0d |sposed o|f.local.|
|00001740| 64 69 6d 20 74 68 65 45 | 6c 65 6d 65 6e 74 48 20 |dim theE|lementH |
|00001750| 20 61 73 20 5e 5e 46 42 | 43 4c 69 73 74 45 6c 65 | as ^^FB|CListEle|
|00001760| 6d 20 20 0d 64 69 6d 20 | 70 72 65 63 45 6c 65 6d |m .dim |precElem|
|00001770| 65 6e 74 48 20 61 73 20 | 5e 5e 46 42 43 4c 69 73 |entH as |^^FBCLis|
|00001780| 74 45 6c 65 6d 20 20 0d | 64 69 6d 20 77 52 65 66 |tElem .|dim wRef|
|00001790| 43 6f 6e 20 20 20 20 20 | 20 61 73 20 5e 5e 46 42 |Con | as ^^FB|
|000017a0| 77 69 6e 64 6f 77 44 65 | 73 63 72 69 70 74 69 6f |windowDe|scriptio|
|000017b0| 6e 0d 6c 6f 63 61 6c 20 | 66 6e 20 52 65 6d 6f 76 |n.local |fn Remov|
|000017c0| 65 46 42 43 6f 6e 74 72 | 6f 6c 46 72 6f 6d 4c 69 |eFBContr|olFromLi|
|000017d0| 73 74 28 20 77 20 61 73 | 20 57 69 6e 64 6f 77 52 |st( w as| WindowR|
|000017e0| 65 66 2c 20 63 20 61 73 | 20 43 6f 6e 74 72 6f 6c |ef, c as| Control|
|000017f0| 52 65 66 20 29 0d 27 7e | 27 31 0d 77 52 65 66 43 |Ref ).'~|'1.wRefC|
|00001800| 6f 6e 20 20 3d 20 66 6e | 20 47 65 74 57 52 65 66 |on = fn| GetWRef|
|00001810| 43 6f 6e 28 20 77 20 29 | 0d 70 72 65 63 45 6c 65 |Con( w )|.precEle|
|00001820| 6d 65 6e 74 48 20 3d 20 | 30 0d 74 68 65 45 6c 65 |mentH = |0.theEle|
|00001830| 6d 65 6e 74 48 20 20 3d | 20 77 52 65 66 43 6f 6e |mentH =| wRefCon|
|00001840| 2e 2e 46 42 77 43 6f 6e | 74 72 6f 6c 4c 69 73 74 |..FBwCon|trolList|
|00001850| 0d 77 68 69 6c 65 20 74 | 68 65 45 6c 65 6d 65 6e |.while t|heElemen|
|00001860| 74 48 20 2f 2f 20 77 61 | 6c 6b 20 6c 69 73 74 0d |tH // wa|lk list.|
|00001870| 6c 6f 6e 67 20 69 66 20 | 74 68 65 45 6c 65 6d 65 |long if |theEleme|
|00001880| 6e 74 48 2e 2e 63 20 3d | 3d 20 63 20 2f 2f 20 66 |ntH..c =|= c // f|
|00001890| 6f 75 6e 64 0d 6c 6f 6e | 67 20 69 66 20 70 72 65 |ound.lon|g if pre|
|000018a0| 63 45 6c 65 6d 65 6e 74 | 48 20 3d 3d 20 30 20 2f |cElement|H == 0 /|
|000018b0| 2f 20 63 6c 6f 73 69 6e | 67 20 66 69 72 73 74 20 |/ closin|g first |
|000018c0| 6f 66 20 6c 69 73 74 0d | 77 52 65 66 43 6f 6e 2e |of list.|wRefCon.|
|000018d0| 2e 46 42 77 43 6f 6e 74 | 72 6f 6c 4c 69 73 74 20 |.FBwCont|rolList |
|000018e0| 3d 20 74 68 65 45 6c 65 | 6d 65 6e 74 48 2e 2e 71 |= theEle|mentH..q|
|000018f0| 4c 69 6e 6b 0d 78 65 6c | 73 65 0d 70 72 65 63 45 |Link.xel|se.precE|
|00001900| 6c 65 6d 65 6e 74 48 2e | 2e 71 4c 69 6e 6b 20 3d |lementH.|.qLink =|
|00001910| 20 74 68 65 45 6c 65 6d | 65 6e 74 48 2e 2e 71 4c | theElem|entH..qL|
|00001920| 69 6e 6b 0d 65 6e 64 20 | 69 66 0d 44 69 73 70 6f |ink.end |if.Dispo|
|00001930| 73 65 48 61 6e 64 6c 65 | 28 20 74 68 65 45 6c 65 |seHandle|( theEle|
|00001940| 6d 65 6e 74 48 20 29 0d | 65 78 69 74 20 66 6e 0d |mentH ).|exit fn.|
|00001950| 65 6e 64 20 69 66 0d 70 | 72 65 63 45 6c 65 6d 65 |end if.p|recEleme|
|00001960| 6e 74 48 20 3d 20 74 68 | 65 45 6c 65 6d 65 6e 74 |ntH = th|eElement|
|00001970| 48 0d 74 68 65 45 6c 65 | 6d 65 6e 74 48 20 20 3d |H.theEle|mentH =|
|00001980| 20 74 68 65 45 6c 65 6d | 65 6e 74 48 2e 2e 71 4c | theElem|entH..qL|
|00001990| 69 6e 6b 0d 77 65 6e 64 | 0d 65 6e 64 20 66 6e 0d |ink.wend|.end fn.|
|000019a0| 0d 0d 2f 2f 20 20 20 57 | 61 6c 6b 20 74 68 65 20 |..// W|alk the |
|000019b0| 63 6f 6e 74 72 6f 6c 20 | 6c 69 73 74 20 61 6e 64 |control |list and|
|000019c0| 20 72 65 74 75 72 6e 20 | 63 20 74 68 61 74 20 6d | return |c that m|
|000019d0| 61 74 63 68 65 73 20 62 | 75 74 4e 75 6d 2e 20 4d |atches b|utNum. M|
|000019e0| 75 63 68 20 66 61 73 74 | 65 72 20 74 68 61 6e 20 |uch fast|er than |
|000019f0| 73 65 61 72 63 68 69 6e | 67 20 74 68 65 20 63 6f |searchin|g the co|
|00001a00| 6e 74 72 6f 6c 20 65 6d | 62 65 64 64 69 6e 67 20 |ntrol em|bedding |
|00001a10| 68 69 65 72 61 72 63 68 | 79 0d 6c 6f 63 61 6c 0d |hierarch|y.local.|
|00001a20| 64 69 6d 20 63 52 65 66 | 43 6f 6e 20 20 20 20 20 |dim cRef|Con |
|00001a30| 61 73 20 5e 5e 46 42 63 | 6f 6e 74 72 6f 6c 44 65 |as ^^FBc|ontrolDe|
|00001a40| 73 63 72 69 70 74 69 6f | 6e 0d 64 69 6d 20 74 68 |scriptio|n.dim th|
|00001a50| 65 45 6c 65 6d 65 6e 74 | 48 20 61 73 20 5e 5e 46 |eElement|H as ^^F|
|00001a60| 42 43 4c 69 73 74 45 6c | 65 6d 20 20 0d 64 69 6d |BCListEl|em .dim|
|00001a70| 20 63 20 20 20 20 20 20 | 20 20 20 20 20 61 73 20 | c | as |
|00001a80| 43 6f 6e 74 72 6f 6c 52 | 65 66 0d 64 69 6d 20 77 |ControlR|ef.dim w|
|00001a90| 52 65 66 43 6f 6e 20 20 | 20 20 20 61 73 20 5e 5e |RefCon | as ^^|
|00001aa0| 46 42 77 69 6e 64 6f 77 | 44 65 73 63 72 69 70 74 |FBwindow|Descript|
|00001ab0| 69 6f 6e 0d 6c 6f 63 61 | 6c 20 66 6e 20 46 69 6e |ion.loca|l fn Fin|
|00001ac0| 64 46 42 42 74 6e 43 6f | 6e 74 72 6f 6c 28 20 77 |dFBBtnCo|ntrol( w|
|00001ad0| 20 61 73 20 57 69 6e 64 | 6f 77 52 65 66 2c 20 62 | as Wind|owRef, b|
|00001ae0| 75 74 4e 75 6d 20 61 73 | 20 6c 6f 6e 67 20 29 0d |utNum as| long ).|
|00001af0| 27 7e 27 31 0d 63 20 3d | 20 30 20 2f 2f 20 64 65 |'~'1.c =| 0 // de|
|00001b00| 66 61 75 6c 74 20 6e 6f | 74 20 66 6f 75 6e 64 0d |fault no|t found.|
|00001b10| 77 52 65 66 43 6f 6e 20 | 20 3d 20 66 6e 20 47 65 |wRefCon | = fn Ge|
|00001b20| 74 57 52 65 66 43 6f 6e | 28 20 77 20 29 0d 74 68 |tWRefCon|( w ).th|
|00001b30| 65 45 6c 65 6d 65 6e 74 | 48 20 3d 20 77 52 65 66 |eElement|H = wRef|
|00001b40| 43 6f 6e 2e 2e 46 42 77 | 43 6f 6e 74 72 6f 6c 4c |Con..FBw|ControlL|
|00001b50| 69 73 74 0d 77 68 69 6c | 65 20 74 68 65 45 6c 65 |ist.whil|e theEle|
|00001b60| 6d 65 6e 74 48 0d 63 52 | 65 66 43 6f 6e 20 3d 20 |mentH.cR|efCon = |
|00001b70| 74 68 65 45 6c 65 6d 65 | 6e 74 48 2e 2e 63 52 65 |theEleme|ntH..cRe|
|00001b80| 66 43 6f 6e 0d 6c 6f 6e | 67 20 69 66 20 63 52 65 |fCon.lon|g if cRe|
|00001b90| 66 43 6f 6e 2e 2e 46 42 | 63 6f 6e 74 72 6f 6c 52 |fCon..FB|controlR|
|00001ba0| 65 66 20 3d 3d 20 62 75 | 74 4e 75 6d 20 2f 2f 20 |ef == bu|tNum // |
|00001bb0| 66 6f 75 6e 64 0d 63 20 | 3d 20 74 68 65 45 6c 65 |found.c |= theEle|
|00001bc0| 6d 65 6e 74 48 2e 2e 63 | 0d 65 78 69 74 20 66 6e |mentH..c|.exit fn|
|00001bd0| 0d 65 6e 64 20 69 66 0d | 74 68 65 45 6c 65 6d 65 |.end if.|theEleme|
|00001be0| 6e 74 48 20 3d 20 74 68 | 65 45 6c 65 6d 65 6e 74 |ntH = th|eElement|
|00001bf0| 48 2e 2e 71 4c 69 6e 6b | 0d 77 65 6e 64 0d 65 6e |H..qLink|.wend.en|
|00001c00| 64 20 66 6e 20 3d 20 63 | 0d 0d 0d 2f 2f 20 20 20 |d fn = c|...// |
|00001c10| 72 65 70 65 61 74 65 64 | 6c 79 20 63 6c 6f 73 65 |repeated|ly close|
|00001c20| 20 66 69 72 73 74 20 63 | 6f 6e 74 72 6f 6c 20 69 | first c|ontrol i|
|00001c30| 6e 20 74 68 65 20 6c 69 | 73 74 20 75 6e 74 69 6c |n the li|st until|
|00001c40| 20 5f 6e 69 6c 0d 6c 6f | 63 61 6c 0d 64 69 6d 20 | _nil.lo|cal.dim |
|00001c50| 77 52 65 66 43 6f 6e 20 | 20 20 20 20 61 73 20 5e |wRefCon | as ^|
|00001c60| 5e 46 42 77 69 6e 64 6f | 77 44 65 73 63 72 69 70 |^FBwindo|wDescrip|
|00001c70| 74 69 6f 6e 0d 64 69 6d | 20 63 52 65 66 43 6f 6e |tion.dim| cRefCon|
|00001c80| 20 20 20 20 20 61 73 20 | 5e 5e 46 42 63 6f 6e 74 | as |^^FBcont|
|00001c90| 72 6f 6c 44 65 73 63 72 | 69 70 74 69 6f 6e 0d 64 |rolDescr|iption.d|
|00001ca0| 69 6d 20 74 68 65 45 6c | 65 6d 65 6e 74 48 20 61 |im theEl|ementH a|
|00001cb0| 73 20 5e 5e 46 42 43 4c | 69 73 74 45 6c 65 6d 20 |s ^^FBCL|istElem |
|00001cc0| 20 0d 6c 6f 63 61 6c 20 | 66 6e 20 43 6c 6f 73 65 | .local |fn Close|
|00001cd0| 46 42 41 6c 6c 42 74 6e | 73 28 20 77 20 61 73 20 |FBAllBtn|s( w as |
|00001ce0| 57 69 6e 64 6f 77 52 65 | 66 20 29 0d 27 7e 27 31 |WindowRe|f ).'~'1|
|00001cf0| 0d 77 52 65 66 43 6f 6e | 20 20 3d 20 66 6e 20 47 |.wRefCon| = fn G|
|00001d00| 65 74 57 52 65 66 43 6f | 6e 28 20 77 20 29 0d 74 |etWRefCo|n( w ).t|
|00001d10| 68 65 45 6c 65 6d 65 6e | 74 48 20 3d 20 77 52 65 |heElemen|tH = wRe|
|00001d20| 66 43 6f 6e 2e 2e 46 42 | 77 43 6f 6e 74 72 6f 6c |fCon..FB|wControl|
|00001d30| 4c 69 73 74 0d 77 68 69 | 6c 65 20 74 68 65 45 6c |List.whi|le theEl|
|00001d40| 65 6d 65 6e 74 48 0d 63 | 52 65 66 43 6f 6e 20 3d |ementH.c|RefCon =|
|00001d50| 20 74 68 65 45 6c 65 6d | 65 6e 74 48 2e 2e 63 52 | theElem|entH..cR|
|00001d60| 65 66 43 6f 6e 0d 62 75 | 74 74 6f 6e 20 63 6c 6f |efCon.bu|tton clo|
|00001d70| 73 65 20 63 52 65 66 43 | 6f 6e 2e 2e 46 42 63 6f |se cRefC|on..FBco|
|00001d80| 6e 74 72 6f 6c 52 65 66 | 0d 74 68 65 45 6c 65 6d |ntrolRef|.theElem|
|00001d90| 65 6e 74 48 20 3d 20 77 | 52 65 66 43 6f 6e 2e 2e |entH = w|RefCon..|
|00001da0| 46 42 77 43 6f 6e 74 72 | 6f 6c 4c 69 73 74 0d 77 |FBwContr|olList.w|
|00001db0| 65 6e 64 0d 65 6e 64 20 | 66 6e 0d 0d 0d 23 69 66 |end.end |fn...#if|
|00001dc0| 20 30 20 2f 2f 20 6f 6c | 64 20 63 6f 64 65 0d 2f | 0 // ol|d code./|
|00001dd0| 2a 0d 20 20 20 43 68 65 | 63 6b 73 20 61 6c 6c 20 |*. Che|cks all |
|00001de0| 73 75 62 20 63 6f 6e 74 | 72 6f 6c 73 20 72 65 63 |sub cont|rols rec|
|00001df0| 75 72 73 69 76 65 6c 79 | 20 73 74 61 72 74 69 6e |ursively| startin|
|00001e00| 67 20 61 74 20 63 48 6e | 64 6c 2e 0d 20 20 20 4e |g at cHn|dl.. N|
|00001e10| 6f 72 6d 61 6c 6c 79 2c | 20 74 68 65 20 66 69 72 |ormally,| the fir|
|00001e20| 73 74 20 63 61 6c 6c 20 | 74 6f 20 74 68 69 73 20 |st call |to this |
|00001e30| 72 6f 75 74 69 6e 65 20 | 69 73 20 77 69 74 68 20 |routine |is with |
|00001e40| 74 68 65 20 72 6f 6f 74 | 20 63 6f 6e 74 72 6f 6c |the root| control|
|00001e50| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 2e 0d | of the |window..|
|00001e60| 20 20 20 46 69 6e 64 73 | 20 6f 6e 6c 79 20 63 6f | Finds| only co|
|00001e70| 6e 74 72 6f 6c 73 20 77 | 69 74 68 20 46 42 63 6f |ntrols w|ith FBco|
|00001e80| 6e 74 72 6f 6c 43 6c 61 | 73 73 20 3d 3d 20 5f 62 |ntrolCla|ss == _b|
|00001e90| 75 74 74 6f 6e 43 6f 6e | 74 72 6f 6c 43 6c 61 73 |uttonCon|trolClas|
|00001ea0| 73 20 28 6e 6f 74 20 45 | 46 73 20 6f 72 20 70 69 |s (not E|Fs or pi|
|00001eb0| 63 74 75 72 65 20 66 69 | 65 6c 64 73 29 0d 20 20 |cture fi|elds). |
|00001ec0| 20 43 61 6c 6c 65 64 20 | 66 72 6f 6d 20 46 69 6e | Called |from Fin|
|00001ed0| 64 46 42 42 74 6e 43 6f | 6e 74 72 6f 6c 20 62 65 |dFBBtnCo|ntrol be|
|00001ee0| 6c 6f 77 0d 2a 2f 0d 6c | 6f 63 61 6c 20 6d 6f 64 |low.*/.l|ocal mod|
|00001ef0| 65 0d 64 69 6d 20 63 52 | 65 66 43 6f 6e 20 20 61 |e.dim cR|efCon a|
|00001f00| 73 20 5e 5e 46 42 63 6f | 6e 74 72 6f 6c 44 65 73 |s ^^FBco|ntrolDes|
|00001f10| 63 72 69 70 74 69 6f 6e | 0d 64 69 6d 20 40 20 63 |cription|.dim @ c|
|00001f20| 53 75 62 20 20 20 61 73 | 20 43 6f 6e 74 72 6f 6c |Sub as| Control|
|00001f30| 52 65 66 0d 64 69 6d 20 | 69 6e 64 65 78 20 20 20 |Ref.dim |index |
|00001f40| 20 61 73 20 6c 6f 6e 67 | 0d 64 69 6d 20 40 20 63 | as long|.dim @ c|
|00001f50| 6f 75 6e 74 20 20 61 73 | 20 73 68 6f 72 74 0d 6c |ount as| short.l|
|00001f60| 6f 63 61 6c 20 66 6e 20 | 46 42 46 69 6e 64 42 74 |ocal fn |FBFindBt|
|00001f70| 6e 53 75 62 28 20 62 74 | 6e 4e 75 6d 20 61 73 20 |nSub( bt|nNum as |
|00001f80| 6c 6f 6e 67 2c 20 63 20 | 61 73 20 43 6f 6e 74 72 |long, c |as Contr|
|00001f90| 6f 6c 52 65 66 20 29 0d | 27 7e 27 31 0d 63 52 65 |olRef ).|'~'1.cRe|
|00001fa0| 66 43 6f 6e 20 3d 20 66 | 6e 20 47 65 74 43 52 65 |fCon = f|n GetCRe|
|00001fb0| 66 43 6f 6e 28 20 63 20 | 29 0d 6c 6f 6e 67 20 69 |fCon( c |).long i|
|00001fc0| 66 20 66 6e 20 49 73 43 | 52 65 66 43 6f 6e 46 42 |f fn IsC|RefConFB|
|00001fd0| 48 61 6e 64 6c 65 28 20 | 63 52 65 66 43 6f 6e 20 |Handle( |cRefCon |
|00001fe0| 29 0d 6c 6f 6e 67 20 69 | 66 20 63 52 65 66 43 6f |).long i|f cRefCo|
|00001ff0| 6e 2e 2e 46 42 63 6f 6e | 74 72 6f 6c 43 6c 61 73 |n..FBcon|trolClas|
|00002000| 73 20 3d 3d 20 5f 62 75 | 74 74 6f 6e 43 6f 6e 74 |s == _bu|ttonCont|
|00002010| 72 6f 6c 43 6c 61 73 73 | 0d 6c 6f 6e 67 20 69 66 |rolClass|.long if|
|00002020| 20 63 52 65 66 43 6f 6e | 2e 2e 46 42 63 6f 6e 74 | cRefCon|..FBcont|
|00002030| 72 6f 6c 52 65 66 20 3d | 3d 20 62 74 6e 4e 75 6d |rolRef =|= btnNum|
|00002040| 0d 63 53 75 62 20 3d 20 | 63 0d 65 78 69 74 20 66 |.cSub = |c.exit f|
|00002050| 6e 0d 65 6e 64 20 69 66 | 0d 65 6e 64 20 69 66 0d |n.end if|.end if.|
|00002060| 65 6e 64 20 69 66 0d 63 | 53 75 62 20 3d 20 30 0d |end if.c|Sub = 0.|
|00002070| 6c 6f 6e 67 20 69 66 20 | 66 6e 20 43 6f 75 6e 74 |long if |fn Count|
|00002080| 53 75 62 63 6f 6e 74 72 | 6f 6c 73 28 20 63 2c 20 |Subcontr|ols( c, |
|00002090| 63 6f 75 6e 74 20 29 20 | 3d 3d 20 5f 6e 6f 45 72 |count ) |== _noEr|
|000020a0| 72 0d 69 6e 64 65 78 20 | 3d 20 31 0d 77 68 69 6c |r.index |= 1.whil|
|000020b0| 65 20 28 20 69 6e 64 65 | 78 20 3c 3d 20 63 6f 75 |e ( inde|x <= cou|
|000020c0| 6e 74 20 29 20 61 6e 64 | 20 28 20 63 53 75 62 20 |nt ) and| ( cSub |
|000020d0| 3d 3d 20 30 20 29 0d 6c | 6f 6e 67 20 69 66 20 66 |== 0 ).l|ong if f|
|000020e0| 6e 20 47 65 74 49 6e 64 | 65 78 65 64 53 75 62 63 |n GetInd|exedSubc|
|000020f0| 6f 6e 74 72 6f 6c 28 20 | 63 2c 20 69 6e 64 65 78 |ontrol( |c, index|
|00002100| 2c 20 63 53 75 62 20 29 | 20 3d 3d 20 5f 6e 6f 45 |, cSub )| == _noE|
|00002110| 72 72 0d 63 53 75 62 20 | 3d 20 66 6e 20 46 42 46 |rr.cSub |= fn FBF|
|00002120| 69 6e 64 42 74 6e 53 75 | 62 28 20 62 74 6e 4e 75 |indBtnSu|b( btnNu|
|00002130| 6d 2c 20 63 53 75 62 20 | 29 0d 65 6e 64 20 69 66 |m, cSub |).end if|
|00002140| 0d 69 6e 64 65 78 2b 2b | 0d 77 65 6e 64 0d 65 6e |.index++|.wend.en|
|00002150| 64 20 69 66 0d 65 6e 64 | 20 66 6e 20 3d 20 63 53 |d if.end| fn = cS|
|00002160| 75 62 0d 0d 0d 2f 2f 20 | 20 47 69 76 65 6e 20 61 |ub...// | Given a|
|00002170| 20 62 75 74 74 6f 6e 20 | 72 65 66 65 72 65 6e 63 | button |referenc|
|00002180| 65 20 6e 75 6d 62 65 72 | 2c 20 72 65 74 75 72 6e |e number|, return|
|00002190| 20 61 20 63 6f 6e 74 72 | 6f 6c 20 68 61 6e 64 6c | a contr|ol handl|
|000021a0| 65 0d 6c 6f 63 61 6c 20 | 6d 6f 64 65 0d 64 69 6d |e.local |mode.dim|
|000021b0| 20 40 20 72 6f 6f 74 20 | 20 61 73 20 43 6f 6e 74 | @ root | as Cont|
|000021c0| 72 6f 6c 52 65 66 0d 64 | 69 6d 20 63 20 20 20 20 |rolRef.d|im c |
|000021d0| 20 20 20 61 73 20 43 6f | 6e 74 72 6f 6c 52 65 66 | as Co|ntrolRef|
|000021e0| 0d 64 69 6d 20 40 20 70 | 6f 72 74 20 20 61 73 20 |.dim @ p|ort as |
|000021f0| 43 47 72 61 66 50 74 72 | 0d 64 69 6d 20 40 20 77 |CGrafPtr|.dim @ w|
|00002200| 20 20 20 20 20 61 73 20 | 57 69 6e 64 6f 77 52 65 | as |WindowRe|
|00002210| 66 0d 64 69 6d 20 40 20 | 77 4e 75 6d 20 20 61 73 |f.dim @ |wNum as|
|00002220| 20 6c 6f 6e 67 0d 6c 6f | 63 61 6c 20 66 6e 20 46 | long.lo|cal fn F|
|00002230| 69 6e 64 46 42 42 74 6e | 43 6f 6e 74 72 6f 6c 28 |indFBBtn|Control(|
|00002240| 20 62 74 6e 4e 75 6d 20 | 61 73 20 6c 6f 6e 67 20 | btnNum |as long |
|00002250| 29 0d 27 7e 27 31 0d 63 | 20 3d 20 30 0d 66 6e 20 |).'~'1.c| = 0.fn |
|00002260| 46 42 67 65 74 43 75 72 | 57 6e 64 49 6e 66 6f 28 |FBgetCur|WndInfo(|
|00002270| 20 70 6f 72 74 2c 20 77 | 2c 20 77 4e 75 6d 20 29 | port, w|, wNum )|
|00002280| 0d 6c 6f 6e 67 20 69 66 | 20 77 4e 75 6d 0d 6c 6f |.long if| wNum.lo|
|00002290| 6e 67 20 69 66 20 66 6e | 20 47 65 74 52 6f 6f 74 |ng if fn| GetRoot|
|000022a0| 43 6f 6e 74 72 6f 6c 28 | 20 77 2c 20 72 6f 6f 74 |Control(| w, root|
|000022b0| 20 29 20 3d 3d 20 5f 6e | 6f 45 72 72 0d 63 20 3d | ) == _n|oErr.c =|
|000022c0| 20 66 6e 20 46 42 46 69 | 6e 64 42 74 6e 53 75 62 | fn FBFi|ndBtnSub|
|000022d0| 28 20 62 74 6e 4e 75 6d | 2c 20 72 6f 6f 74 20 29 |( btnNum|, root )|
|000022e0| 0d 65 6e 64 20 69 66 0d | 65 6e 64 20 69 66 0d 65 |.end if.|end if.e|
|000022f0| 6e 64 20 66 6e 20 3d 20 | 63 0d 0d 23 65 6e 64 69 |nd fn = |c..#endi|
|00002300| 66 0d 0d 0d 2f 2f 20 20 | 20 47 69 76 65 6e 20 61 |f...// | Given a|
|00002310| 20 63 6f 6e 74 72 6f 6c | 20 68 61 6e 64 6c 65 2c | control| handle,|
|00002320| 20 72 65 74 75 72 6e 20 | 61 20 72 65 66 65 72 65 | return |a refere|
|00002330| 6e 63 65 20 6e 75 6d 62 | 65 72 2e 20 57 6f 72 6b |nce numb|er. Work|
|00002340| 73 20 66 6f 72 20 62 75 | 74 74 6f 6e 73 2c 20 45 |s for bu|ttons, E|
|00002350| 46 73 2c 20 70 69 63 74 | 75 72 65 20 66 69 65 6c |Fs, pict|ure fiel|
|00002360| 64 73 20 61 6e 64 20 61 | 6c 6c 0d 6c 6f 63 61 6c |ds and a|ll.local|
|00002370| 20 6d 6f 64 65 0d 64 69 | 6d 20 62 74 6e 4e 75 6d | mode.di|m btnNum|
|00002380| 20 20 20 20 61 73 20 6c | 6f 6e 67 0d 64 69 6d 20 | as l|ong.dim |
|00002390| 63 52 65 66 43 6f 6e 20 | 61 73 20 5e 5e 46 42 63 |cRefCon |as ^^FBc|
|000023a0| 6f 6e 74 72 6f 6c 44 65 | 73 63 72 69 70 74 69 6f |ontrolDe|scriptio|
|000023b0| 6e 0d 6c 6f 63 61 6c 20 | 66 6e 20 46 42 67 65 74 |n.local |fn FBget|
|000023c0| 43 6f 6e 74 72 6f 6c 52 | 65 66 28 20 63 20 61 73 |ControlR|ef( c as|
|000023d0| 20 43 6f 6e 74 72 6f 6c | 52 65 66 20 29 0d 27 7e | Control|Ref ).'~|
|000023e0| 27 31 0d 62 74 6e 4e 75 | 6d 20 3d 20 30 0d 6c 6f |'1.btnNu|m = 0.lo|
|000023f0| 6e 67 20 69 66 20 63 0d | 63 52 65 66 43 6f 6e 20 |ng if c.|cRefCon |
|00002400| 3d 20 66 6e 20 47 65 74 | 43 52 65 66 43 6f 6e 28 |= fn Get|CRefCon(|
|00002410| 20 63 20 29 0d 69 66 20 | 66 6e 20 49 73 43 52 65 | c ).if |fn IsCRe|
|00002420| 66 43 6f 6e 46 42 48 61 | 6e 64 6c 65 20 28 20 63 |fConFBHa|ndle ( c|
|00002430| 52 65 66 43 6f 6e 20 29 | 20 74 68 65 6e 20 62 74 |RefCon )| then bt|
|00002440| 6e 4e 75 6d 20 3d 20 63 | 52 65 66 43 6f 6e 2e 2e |nNum = c|RefCon..|
|00002450| 46 42 63 6f 6e 74 72 6f | 6c 52 65 66 0d 65 6e 64 |FBcontro|lRef.end|
|00002460| 20 69 66 0d 65 6e 64 20 | 66 6e 20 3d 20 62 74 6e | if.end |fn = btn|
|00002470| 4e 75 6d 0d 0d 0d 2f 2f | 20 20 78 20 3d 20 42 55 |Num...//| x = BU|
|00002480| 54 54 4f 4e 28 62 74 6e | 4e 75 6d 2c 63 45 78 74 |TTON(btn|Num,cExt|
|00002490| 72 61 29 0d 2f 2f 20 20 | 69 66 20 63 45 78 74 72 |ra).// |if cExtr|
|000024a0| 61 20 69 73 20 6e 65 67 | 61 74 69 76 65 2c 20 67 |a is neg|ative, g|
|000024b0| 65 74 20 69 6e 64 65 78 | 65 64 20 73 75 62 20 63 |et index|ed sub c|
|000024c0| 6f 6e 74 72 6f 6c 0d 6c | 6f 63 61 6c 0d 64 69 6d |ontrol.l|ocal.dim|
|000024d0| 20 40 20 72 65 73 75 6c | 74 20 20 61 73 20 6c 6f | @ resul|t as lo|
|000024e0| 6e 67 0d 64 69 6d 20 40 | 20 63 20 20 20 20 20 20 |ng.dim @| c |
|000024f0| 20 61 73 20 43 6f 6e 74 | 72 6f 6c 52 65 66 0d 64 | as Cont|rolRef.d|
|00002500| 69 6d 20 40 20 70 6f 72 | 74 20 20 20 20 61 73 20 |im @ por|t as |
|00002510| 43 47 72 61 66 50 74 72 | 0d 64 69 6d 20 40 20 77 |CGrafPtr|.dim @ w|
|00002520| 20 20 20 20 20 20 20 61 | 73 20 57 69 6e 64 6f 77 | a|s Window|
|00002530| 52 65 66 0d 64 69 6d 20 | 40 20 77 4e 75 6d 20 20 |Ref.dim |@ wNum |
|00002540| 20 20 61 73 20 6c 6f 6e | 67 0d 64 69 6d 20 40 62 | as lon|g.dim @b|
|00002550| 75 66 66 53 69 7a 65 20 | 61 73 20 6c 6f 6e 67 0d |uffSize |as long.|
|00002560| 64 69 6d 20 63 52 65 66 | 43 6f 6e 20 20 20 61 73 |dim cRef|Con as|
|00002570| 20 5e 5e 46 42 63 6f 6e | 74 72 6f 6c 44 65 73 63 | ^^FBcon|trolDesc|
|00002580| 72 69 70 74 69 6f 6e 0d | 64 69 6d 20 65 72 72 20 |ription.|dim err |
|00002590| 20 20 20 20 20 20 61 73 | 20 4f 53 45 72 72 0d 64 | as| OSErr.d|
|000025a0| 69 6d 20 40 20 69 6e 64 | 65 78 20 20 20 61 73 20 |im @ ind|ex as |
|000025b0| 73 68 6f 72 74 0d 72 75 | 6e 74 69 6d 65 20 42 75 |short.ru|ntime Bu|
|000025c0| 74 74 6f 6e 28 20 62 74 | 6e 4e 75 6d 20 61 73 20 |tton( bt|nNum as |
|000025d0| 6c 6f 6e 67 2c 20 63 45 | 78 74 72 61 20 61 73 20 |long, cE|xtra as |
|000025e0| 6c 6f 6e 67 20 29 0d 27 | 7e 27 31 0d 72 65 73 75 |long ).'|~'1.resu|
|000025f0| 6c 74 20 3d 20 30 0d 67 | 46 42 43 6f 6e 74 72 6f |lt = 0.g|FBContro|
|00002600| 6c 54 65 78 74 5b 30 5d | 20 3d 20 30 0d 0d 6c 6f |lText[0]| = 0..lo|
|00002610| 6e 67 20 69 66 20 63 45 | 78 74 72 61 20 3c 20 30 |ng if cE|xtra < 0|
|00002620| 2f 2f 20 68 61 6e 64 6c | 65 20 69 6e 63 6f 6d 69 |// handl|e incomi|
|00002630| 6e 67 20 6e 65 67 61 74 | 69 76 65 20 61 73 20 69 |ng negat|ive as i|
|00002640| 6e 64 65 78 0d 69 6e 64 | 65 78 20 3d 20 2d 63 45 |ndex.ind|ex = -cE|
|00002650| 78 74 72 61 0d 63 45 78 | 74 72 61 20 3d 20 5f 46 |xtra.cEx|tra = _F|
|00002660| 42 47 65 74 49 6e 64 65 | 78 65 64 53 75 62 63 6f |BGetInde|xedSubco|
|00002670| 6e 74 72 6f 6c 0d 65 6e | 64 20 69 66 0d 0d 66 6e |ntrol.en|d if..fn|
|00002680| 20 46 42 67 65 74 43 75 | 72 57 6e 64 49 6e 66 6f | FBgetCu|rWndInfo|
|00002690| 28 20 70 6f 72 74 2c 20 | 77 2c 20 77 4e 75 6d 20 |( port, |w, wNum |
|000026a0| 29 0d 6c 6f 6e 67 20 69 | 66 20 77 4e 75 6d 0d 63 |).long i|f wNum.c|
|000026b0| 20 3d 20 66 6e 20 46 69 | 6e 64 46 42 42 74 6e 43 | = fn Fi|ndFBBtnC|
|000026c0| 6f 6e 74 72 6f 6c 20 28 | 20 77 2c 20 62 74 6e 4e |ontrol (| w, btnN|
|000026d0| 75 6d 20 29 0d 65 6e 64 | 20 69 66 0d 0d 6c 6f 6e |um ).end| if..lon|
|000026e0| 67 20 69 66 20 63 0d 73 | 65 6c 65 63 74 20 63 61 |g if c.s|elect ca|
|000026f0| 73 65 20 63 45 78 74 72 | 61 0d 63 61 73 65 20 30 |se cExtr|a.case 0|
|00002700| 0d 6c 6f 6e 67 20 69 66 | 20 66 6e 20 49 73 43 6f |.long if| fn IsCo|
|00002710| 6e 74 72 6f 6c 41 63 74 | 69 76 65 28 20 63 20 29 |ntrolAct|ive( c )|
|00002720| 20 3d 3d 20 5f 66 61 6c | 73 65 0d 72 65 73 75 6c | == _fal|se.resul|
|00002730| 74 20 3d 20 30 2f 2f 5f | 67 72 61 79 62 74 6e 20 |t = 0//_|graybtn |
|00002740| 3d 20 30 20 5f 61 63 74 | 69 76 65 62 74 6e 20 3d |= 0 _act|ivebtn =|
|00002750| 20 31 20 5f 6d 61 72 6b | 65 64 62 74 6e 20 3d 20 | 1 _mark|edbtn = |
|00002760| 32 0d 78 65 6c 73 65 0d | 72 65 73 75 6c 74 20 3d |2.xelse.|result =|
|00002770| 20 66 6e 20 47 65 74 43 | 6f 6e 74 72 6f 6c 56 61 | fn GetC|ontrolVa|
|00002780| 6c 75 65 28 20 63 20 29 | 20 2b 20 31 0d 63 52 65 |lue( c )| + 1.cRe|
|00002790| 66 43 6f 6e 20 3d 20 66 | 6e 20 47 65 74 43 52 65 |fCon = f|n GetCRe|
|000027a0| 66 43 6f 6e 28 20 63 20 | 29 0d 6c 6f 6e 67 20 69 |fCon( c |).long i|
|000027b0| 66 20 66 6e 20 49 73 43 | 52 65 66 43 6f 6e 46 42 |f fn IsC|RefConFB|
|000027c0| 48 61 6e 64 6c 65 28 20 | 63 52 65 66 43 6f 6e 20 |Handle( |cRefCon |
|000027d0| 29 0d 69 66 20 63 52 65 | 66 43 6f 6e 2e 2e 6c 65 |).if cRe|fCon..le|
|000027e0| 67 61 63 79 52 75 62 62 | 69 73 68 20 3d 3d 20 5f |gacyRubb|ish == _|
|000027f0| 66 61 6c 73 65 20 74 68 | 65 6e 20 72 65 73 75 6c |false th|en resul|
|00002800| 74 2d 2d 0d 65 6e 64 20 | 69 66 0d 65 6e 64 20 69 |t--.end |if.end i|
|00002810| 66 0d 2f 2f 20 6e 65 77 | 20 70 61 72 61 6d 65 74 |f.// new| paramet|
|00002820| 65 72 73 20 66 6f 72 20 | 41 70 70 65 61 72 61 6e |ers for |Appearan|
|00002830| 63 65 20 72 75 6e 74 69 | 6d 65 0d 63 61 73 65 20 |ce runti|me.case |
|00002840| 5f 46 42 47 65 74 43 74 | 6c 52 61 77 56 61 6c 75 |_FBGetCt|lRawValu|
|00002850| 65 0d 72 65 73 75 6c 74 | 20 3d 20 66 6e 20 47 65 |e.result| = fn Ge|
|00002860| 74 43 6f 6e 74 72 6f 6c | 56 61 6c 75 65 28 20 63 |tControl|Value( c|
|00002870| 20 29 0d 63 61 73 65 20 | 5f 46 42 47 65 74 43 74 | ).case |_FBGetCt|
|00002880| 6c 4d 69 6e 69 6d 75 6d | 0d 72 65 73 75 6c 74 20 |lMinimum|.result |
|00002890| 3d 20 66 6e 20 47 65 74 | 43 6f 6e 74 72 6f 6c 4d |= fn Get|ControlM|
|000028a0| 69 6e 69 6d 75 6d 28 20 | 63 20 29 0d 63 61 73 65 |inimum( |c ).case|
|000028b0| 20 5f 46 42 47 65 74 43 | 74 6c 4d 61 78 69 6d 75 | _FBGetC|tlMaximu|
|000028c0| 6d 0d 72 65 73 75 6c 74 | 20 3d 20 66 6e 20 47 65 |m.result| = fn Ge|
|000028d0| 74 43 6f 6e 74 72 6f 6c | 4d 61 78 69 6d 75 6d 28 |tControl|Maximum(|
|000028e0| 20 63 20 29 0d 63 61 73 | 65 20 5f 46 42 47 65 74 | c ).cas|e _FBGet|
|000028f0| 43 74 6c 50 61 67 65 2f | 2f 20 50 61 67 65 20 55 |CtlPage/|/ Page U|
|00002900| 70 2f 44 6f 77 6e 20 66 | 6f 72 20 73 63 72 6f 6c |p/Down f|or scrol|
|00002910| 6c 73 0d 63 52 65 66 43 | 6f 6e 20 3d 20 66 6e 20 |ls.cRefC|on = fn |
|00002920| 47 65 74 43 52 65 66 43 | 6f 6e 28 20 63 20 29 0d |GetCRefC|on( c ).|
|00002930| 69 66 20 66 6e 20 49 73 | 43 52 65 66 43 6f 6e 46 |if fn Is|CRefConF|
|00002940| 42 48 61 6e 64 6c 65 28 | 20 63 52 65 66 43 6f 6e |BHandle(| cRefCon|
|00002950| 20 29 20 74 68 65 6e 20 | 72 65 73 75 6c 74 20 3d | ) then |result =|
|00002960| 20 63 52 65 66 43 6f 6e | 2e 2e 46 42 63 6f 6e 74 | cRefCon|..FBcont|
|00002970| 72 6f 6c 50 61 67 65 0d | 63 61 73 65 20 5f 46 42 |rolPage.|case _FB|
|00002980| 47 65 74 52 6f 6f 74 43 | 6f 6e 74 72 6f 6c 0d 65 |GetRootC|ontrol.e|
|00002990| 72 72 20 3d 20 66 6e 20 | 47 65 74 52 6f 6f 74 43 |rr = fn |GetRootC|
|000029a0| 6f 6e 74 72 6f 6c 28 20 | 77 2c 20 72 65 73 75 6c |ontrol( |w, resul|
|000029b0| 74 20 29 0d 63 61 73 65 | 20 5f 46 42 43 6f 75 6e |t ).case| _FBCoun|
|000029c0| 74 53 75 62 63 6f 6e 74 | 72 6f 6c 73 0d 65 72 72 |tSubcont|rols.err|
|000029d0| 20 3d 20 66 6e 20 43 6f | 75 6e 74 53 75 62 63 6f | = fn Co|untSubco|
|000029e0| 6e 74 72 6f 6c 73 28 20 | 63 2c 20 69 6e 64 65 78 |ntrols( |c, index|
|000029f0| 20 29 0d 72 65 73 75 6c | 74 20 3d 20 69 6e 64 65 | ).resul|t = inde|
|00002a00| 78 0d 0d 63 61 73 65 20 | 5f 46 42 47 65 74 49 6e |x..case |_FBGetIn|
|00002a10| 64 65 78 65 64 53 75 62 | 63 6f 6e 74 72 6f 6c 0d |dexedSub|control.|
|00002a20| 65 72 72 20 3d 20 66 6e | 20 47 65 74 49 6e 64 65 |err = fn| GetInde|
|00002a30| 78 65 64 53 75 62 63 6f | 6e 74 72 6f 6c 28 20 63 |xedSubco|ntrol( c|
|00002a40| 2c 20 69 6e 64 65 78 2c | 20 72 65 73 75 6c 74 20 |, index,| result |
|00002a50| 29 0d 72 65 73 75 6c 74 | 20 3d 20 66 6e 20 46 42 |).result| = fn FB|
|00002a60| 67 65 74 43 6f 6e 74 72 | 6f 6c 52 65 66 28 20 72 |getContr|olRef( r|
|00002a70| 65 73 75 6c 74 20 29 0d | 0d 63 61 73 65 20 5f 46 |esult ).|.case _F|
|00002a80| 42 47 65 74 53 75 70 65 | 72 43 6f 6e 74 72 6f 6c |BGetSupe|rControl|
|00002a90| 0d 65 72 72 20 3d 20 66 | 6e 20 47 65 74 53 75 70 |.err = f|n GetSup|
|00002aa0| 65 72 43 6f 6e 74 72 6f | 6c 28 20 63 2c 20 72 65 |erContro|l( c, re|
|00002ab0| 73 75 6c 74 20 29 0d 72 | 65 73 75 6c 74 20 3d 20 |sult ).r|esult = |
|00002ac0| 66 6e 20 46 42 67 65 74 | 43 6f 6e 74 72 6f 6c 52 |fn FBget|ControlR|
|00002ad0| 65 66 28 20 63 20 29 0d | 63 61 73 65 20 5f 46 42 |ef( c ).|case _FB|
|00002ae0| 47 65 74 43 6f 6e 74 72 | 6f 6c 44 61 74 65 2c 20 |GetContr|olDate, |
|00002af0| 5f 46 42 67 65 74 43 6f | 6e 74 72 6f 6c 54 69 6d |_FBgetCo|ntrolTim|
|00002b00| 65 0d 67 46 42 43 6f 6e | 74 72 6f 6c 54 65 78 74 |e.gFBCon|trolText|
|00002b10| 5b 30 5d 20 3d 20 30 0d | 6c 6f 6e 67 20 69 66 20 |[0] = 0.|long if |
|00002b20| 66 6e 20 47 65 74 43 6f | 6e 74 72 6f 6c 44 61 74 |fn GetCo|ntrolDat|
|00002b30| 61 53 69 7a 65 28 20 63 | 2c 20 5f 6b 43 6f 6e 74 |aSize( c|, _kCont|
|00002b40| 72 6f 6c 45 64 69 74 54 | 65 78 74 50 61 72 74 2c |rolEditT|extPart,|
|00002b50| 20 5f 6b 43 6f 6e 74 72 | 6f 6c 43 6c 6f 63 6b 4c | _kContr|olClockL|
|00002b60| 6f 6e 67 44 61 74 65 54 | 61 67 2c 20 62 75 66 66 |ongDateT|ag, buff|
|00002b70| 53 69 7a 65 20 29 20 3d | 3d 20 5f 6e 6f 45 72 72 |Size ) =|= _noErr|
|00002b80| 0d 65 72 72 20 3d 20 66 | 6e 20 47 65 74 43 6f 6e |.err = f|n GetCon|
|00002b90| 74 72 6f 6c 44 61 74 61 | 28 20 63 2c 20 5f 6b 43 |trolData|( c, _kC|
|00002ba0| 6f 6e 74 72 6f 6c 45 64 | 69 74 54 65 78 74 50 61 |ontrolEd|itTextPa|
|00002bb0| 72 74 2c 20 5f 6b 43 6f | 6e 74 72 6f 6c 43 6c 6f |rt, _kCo|ntrolClo|
|00002bc0| 63 6b 4c 6f 6e 67 44 61 | 74 65 54 61 67 2c 20 73 |ckLongDa|teTag, s|
|00002bd0| 69 7a 65 6f 66 28 4c 6f | 6e 67 44 61 74 65 52 65 |izeof(Lo|ngDateRe|
|00002be0| 63 29 2c 20 40 67 46 42 | 43 6f 6e 74 72 6f 6c 4c |c), @gFB|ControlL|
|00002bf0| 6f 6e 67 44 61 74 65 2c | 20 62 75 66 66 53 69 7a |ongDate,| buffSiz|
|00002c00| 65 20 29 0d 6c 6f 6e 67 | 20 69 66 20 65 72 72 20 |e ).long| if err |
|00002c10| 3d 3d 20 5f 6e 6f 45 72 | 72 0d 4c 6f 6e 67 44 61 |== _noEr|r.LongDa|
|00002c20| 74 65 54 6f 53 65 63 6f | 6e 64 73 28 20 67 46 42 |teToSeco|nds( gFB|
|00002c30| 43 6f 6e 74 72 6f 6c 4c | 6f 6e 67 44 61 74 65 2c |ControlL|ongDate,|
|00002c40| 20 67 46 42 43 6f 6e 74 | 72 6f 6c 53 65 63 6f 6e | gFBCont|rolSecon|
|00002c50| 64 73 20 29 0d 6c 6f 6e | 67 20 69 66 20 63 45 78 |ds ).lon|g if cEx|
|00002c60| 74 72 61 20 3d 3d 20 5f | 46 42 47 65 74 43 6f 6e |tra == _|FBGetCon|
|00002c70| 74 72 6f 6c 44 61 74 65 | 0d 4c 6f 6e 67 44 61 74 |trolDate|.LongDat|
|00002c80| 65 53 74 72 69 6e 67 28 | 20 67 46 42 43 6f 6e 74 |eString(| gFBCont|
|00002c90| 72 6f 6c 53 65 63 6f 6e | 64 73 2c 20 5f 73 68 6f |rolSecon|ds, _sho|
|00002ca0| 72 74 44 61 74 65 2c 20 | 67 46 42 43 6f 6e 74 72 |rtDate, |gFBContr|
|00002cb0| 6f 6c 54 65 78 74 2c 20 | 30 20 29 0d 78 65 6c 73 |olText, |0 ).xels|
|00002cc0| 65 0d 4c 6f 6e 67 54 69 | 6d 65 53 74 72 69 6e 67 |e.LongTi|meString|
|00002cd0| 28 20 67 46 42 43 6f 6e | 74 72 6f 6c 53 65 63 6f |( gFBCon|trolSeco|
|00002ce0| 6e 64 73 2c 20 5f 73 68 | 6f 72 74 44 61 74 65 2c |nds, _sh|ortDate,|
|00002cf0| 20 67 46 42 43 6f 6e 74 | 72 6f 6c 54 65 78 74 2c | gFBCont|rolText,|
|00002d00| 20 30 20 29 0d 65 6e 64 | 20 69 66 0d 65 6e 64 20 | 0 ).end| if.end |
|00002d10| 69 66 0d 65 6e 64 20 69 | 66 0d 63 61 73 65 20 5f |if.end i|f.case _|
|00002d20| 46 42 67 65 74 43 6f 6e | 74 72 6f 6c 54 45 48 61 |FBgetCon|trolTEHa|
|00002d30| 6e 64 6c 65 0d 65 72 72 | 20 3d 20 66 6e 20 47 65 |ndle.err| = fn Ge|
|00002d40| 74 43 6f 6e 74 72 6f 6c | 44 61 74 61 28 20 63 2c |tControl|Data( c,|
|00002d50| 20 5f 6b 43 6f 6e 74 72 | 6f 6c 45 64 69 74 54 65 | _kContr|olEditTe|
|00002d60| 78 74 50 61 72 74 2c 5f | 6b 43 6f 6e 74 72 6f 6c |xtPart,_|kControl|
|00002d70| 45 64 69 74 54 65 78 74 | 54 45 48 61 6e 64 6c 65 |EditText|TEHandle|
|00002d80| 54 61 67 2c 73 69 7a 65 | 6f 66 28 68 61 6e 64 6c |Tag,size|of(handl|
|00002d90| 65 29 2c 40 72 65 73 75 | 6c 74 2c 62 75 66 66 53 |e),@resu|lt,buffS|
|00002da0| 69 7a 65 29 0d 63 61 73 | 65 20 5f 46 42 67 65 74 |ize).cas|e _FBget|
|00002db0| 42 65 76 65 6c 43 6f 6e | 74 72 6f 6c 4d 65 6e 75 |BevelCon|trolMenu|
|00002dc0| 48 61 6e 64 6c 65 0d 65 | 72 72 20 3d 20 66 6e 20 |Handle.e|rr = fn |
|00002dd0| 47 65 74 43 6f 6e 74 72 | 6f 6c 44 61 74 61 28 20 |GetContr|olData( |
|00002de0| 63 2c 20 5f 6b 43 6f 6e | 74 72 6f 6c 4d 65 6e 75 |c, _kCon|trolMenu|
|00002df0| 50 61 72 74 2c 5f 6b 43 | 6f 6e 74 72 6f 6c 42 65 |Part,_kC|ontrolBe|
|00002e00| 76 65 6c 42 75 74 74 6f | 6e 4d 65 6e 75 48 61 6e |velButto|nMenuHan|
|00002e10| 64 6c 65 54 61 67 2c 73 | 69 7a 65 6f 66 28 68 61 |dleTag,s|izeof(ha|
|00002e20| 6e 64 6c 65 29 2c 40 72 | 65 73 75 6c 74 2c 62 75 |ndle),@r|esult,bu|
|00002e30| 66 66 53 69 7a 65 29 0d | 63 61 73 65 20 5f 46 42 |ffSize).|case _FB|
|00002e40| 67 65 74 42 65 76 65 6c | 43 6f 6e 74 72 6f 6c 4d |getBevel|ControlM|
|00002e50| 65 6e 75 56 61 6c 0d 65 | 72 72 20 3d 20 66 6e 20 |enuVal.e|rr = fn |
|00002e60| 47 65 74 43 6f 6e 74 72 | 6f 6c 44 61 74 61 28 20 |GetContr|olData( |
|00002e70| 63 2c 20 5f 6b 43 6f 6e | 74 72 6f 6c 4d 65 6e 75 |c, _kCon|trolMenu|
|00002e80| 50 61 72 74 2c 5f 6b 43 | 6f 6e 74 72 6f 6c 42 65 |Part,_kC|ontrolBe|
|00002e90| 76 65 6c 42 75 74 74 6f | 6e 4d 65 6e 75 56 61 6c |velButto|nMenuVal|
|00002ea0| 75 65 54 61 67 2c 73 69 | 7a 65 6f 66 28 73 68 6f |ueTag,si|zeof(sho|
|00002eb0| 72 74 29 2c 40 69 6e 64 | 65 78 2c 62 75 66 66 53 |rt),@ind|ex,buffS|
|00002ec0| 69 7a 65 29 0d 72 65 73 | 75 6c 74 20 3d 20 69 6e |ize).res|ult = in|
|00002ed0| 64 65 78 0d 63 61 73 65 | 20 5f 46 42 67 65 74 42 |dex.case| _FBgetB|
|00002ee0| 65 76 65 6c 43 6f 6e 74 | 72 6f 6c 4c 61 73 74 4d |evelCont|rolLastM|
|00002ef0| 65 6e 75 0d 65 72 72 20 | 3d 20 66 6e 20 47 65 74 |enu.err |= fn Get|
|00002f00| 43 6f 6e 74 72 6f 6c 44 | 61 74 61 28 20 63 2c 20 |ControlD|ata( c, |
|00002f10| 5f 6b 43 6f 6e 74 72 6f | 6c 4d 65 6e 75 50 61 72 |_kContro|lMenuPar|
|00002f20| 74 2c 5f 6b 43 6f 6e 74 | 72 6f 6c 42 65 76 65 6c |t,_kCont|rolBevel|
|00002f30| 42 75 74 74 6f 6e 4c 61 | 73 74 4d 65 6e 75 54 61 |ButtonLa|stMenuTa|
|00002f40| 67 2c 73 69 7a 65 6f 66 | 28 73 68 6f 72 74 29 2c |g,sizeof|(short),|
|00002f50| 40 69 6e 64 65 78 2c 62 | 75 66 66 53 69 7a 65 29 |@index,b|uffSize)|
|00002f60| 0d 72 65 73 75 6c 74 20 | 3d 20 69 6e 64 65 78 0d |.result |= index.|
|00002f70| 63 61 73 65 20 5f 46 42 | 67 65 74 43 6f 6e 74 72 |case _FB|getContr|
|00002f80| 6f 6c 4d 65 6e 75 48 61 | 6e 64 6c 65 0d 65 72 72 |olMenuHa|ndle.err|
|00002f90| 20 3d 20 66 6e 20 47 65 | 74 43 6f 6e 74 72 6f 6c | = fn Ge|tControl|
|00002fa0| 44 61 74 61 28 20 63 2c | 20 5f 6b 43 6f 6e 74 72 |Data( c,| _kContr|
|00002fb0| 6f 6c 4d 65 6e 75 50 61 | 72 74 2c 5f 6b 43 6f 6e |olMenuPa|rt,_kCon|
|00002fc0| 74 72 6f 6c 50 6f 70 55 | 70 42 75 74 74 6f 6e 4d |trolPopU|pButtonM|
|00002fd0| 65 6e 75 48 61 6e 64 6c | 65 54 61 67 2c 73 69 7a |enuHandl|eTag,siz|
|00002fe0| 65 6f 66 28 68 61 6e 64 | 6c 65 29 2c 40 72 65 73 |eof(hand|le),@res|
|00002ff0| 75 6c 74 2c 62 75 66 66 | 53 69 7a 65 29 0d 63 61 |ult,buff|Size).ca|
|00003000| 73 65 20 5f 46 42 67 65 | 74 43 6f 6e 74 72 6f 6c |se _FBge|tControl|
|00003010| 4d 65 6e 75 49 44 0d 65 | 72 72 20 3d 20 66 6e 20 |MenuID.e|rr = fn |
|00003020| 47 65 74 43 6f 6e 74 72 | 6f 6c 44 61 74 61 28 20 |GetContr|olData( |
|00003030| 63 2c 20 5f 6b 43 6f 6e | 74 72 6f 6c 4d 65 6e 75 |c, _kCon|trolMenu|
|00003040| 50 61 72 74 2c 5f 6b 43 | 6f 6e 74 72 6f 6c 50 6f |Part,_kC|ontrolPo|
|00003050| 70 55 70 42 75 74 74 6f | 6e 4d 65 6e 75 49 44 54 |pUpButto|nMenuIDT|
|00003060| 61 67 2c 73 69 7a 65 6f | 66 28 73 68 6f 72 74 29 |ag,sizeo|f(short)|
|00003070| 2c 40 69 6e 64 65 78 2c | 62 75 66 66 53 69 7a 65 |,@index,|buffSize|
|00003080| 29 0d 72 65 73 75 6c 74 | 20 3d 20 69 6e 64 65 78 |).result| = index|
|00003090| 0d 63 61 73 65 20 65 6c | 73 65 0d 66 6e 20 52 75 |.case el|se.fn Ru|
|000030a0| 6e 74 69 6d 65 45 72 72 | 4d 73 67 28 20 22 42 61 |ntimeErr|Msg( "Ba|
|000030b0| 64 20 70 61 72 61 6d 65 | 74 65 72 20 66 6f 72 20 |d parame|ter for |
|000030c0| 42 75 74 74 6f 6e 28 29 | 3a 20 22 20 2b 20 73 74 |Button()|: " + st|
|000030d0| 72 24 28 20 63 45 78 74 | 72 61 20 29 20 29 0d 65 |r$( cExt|ra ) ).e|
|000030e0| 6e 64 20 73 65 6c 65 63 | 74 0d 78 65 6c 73 65 0d |nd selec|t.xelse.|
|000030f0| 66 6e 20 52 75 6e 74 69 | 6d 65 45 72 72 4d 73 67 |fn Runti|meErrMsg|
|00003100| 28 20 22 42 75 74 74 6f | 6e 28 29 20 63 61 6c 6c |( "Butto|n() call|
|00003110| 65 64 20 66 6f 72 20 6e | 6f 6e 2d 65 78 69 73 74 |ed for n|on-exist|
|00003120| 65 6e 74 20 62 75 74 74 | 6f 6e 3a 20 22 20 2b 20 |ent butt|on: " + |
|00003130| 73 74 72 24 28 20 62 74 | 6e 4e 75 6d 20 29 20 29 |str$( bt|nNum ) )|
|00003140| 0d 65 6e 64 20 69 66 0d | 65 6e 64 20 66 6e 20 3d |.end if.|end fn =|
|00003150| 20 72 65 73 75 6c 74 0d | 0d 0d 6c 6f 63 61 6c 20 | result.|..local |
|00003160| 6d 6f 64 65 0d 64 69 6d | 20 72 65 73 75 6c 74 20 |mode.dim| result |
|00003170| 20 61 73 20 6c 6f 6e 67 | 0d 64 69 6d 20 63 20 20 | as long|.dim c |
|00003180| 20 20 20 20 20 61 73 20 | 43 6f 6e 74 72 6f 6c 52 | as |ControlR|
|00003190| 65 66 0d 64 69 6d 20 40 | 20 70 6f 72 74 20 20 61 |ef.dim @| port a|
|000031a0| 73 20 43 47 72 61 66 50 | 74 72 0d 64 69 6d 20 40 |s CGrafP|tr.dim @|
|000031b0| 20 77 20 20 20 20 20 61 | 73 20 57 69 6e 64 6f 77 | w a|s Window|
|000031c0| 52 65 66 0d 64 69 6d 20 | 40 20 77 4e 75 6d 20 20 |Ref.dim |@ wNum |
|000031d0| 61 73 20 6c 6f 6e 67 0d | 72 75 6e 74 69 6d 65 20 |as long.|runtime |
|000031e0| 42 75 74 74 6f 6e 48 28 | 20 62 74 6e 4e 75 6d 20 |ButtonH(| btnNum |
|000031f0| 61 73 20 6c 6f 6e 67 2c | 20 6f 70 74 69 6f 6e 61 |as long,| optiona|
|00003200| 6c 4e 6f 74 55 73 65 64 | 20 61 73 20 6c 6f 6e 67 |lNotUsed| as long|
|00003210| 20 29 0d 27 7e 27 31 0d | 72 65 73 75 6c 74 20 3d | ).'~'1.|result =|
|00003220| 20 30 0d 66 6e 20 46 42 | 67 65 74 43 75 72 57 6e | 0.fn FB|getCurWn|
|00003230| 64 49 6e 66 6f 28 20 70 | 6f 72 74 2c 20 77 2c 20 |dInfo( p|ort, w, |
|00003240| 77 4e 75 6d 20 29 0d 6c | 6f 6e 67 20 69 66 20 77 |wNum ).l|ong if w|
|00003250| 4e 75 6d 0d 72 65 73 75 | 6c 74 20 3d 20 66 6e 20 |Num.resu|lt = fn |
|00003260| 46 69 6e 64 46 42 42 74 | 6e 43 6f 6e 74 72 6f 6c |FindFBBt|nControl|
|00003270| 28 20 77 2c 20 62 74 6e | 4e 75 6d 20 29 0d 65 6e |( w, btn|Num ).en|
|00003280| 64 20 69 66 0d 65 6e 64 | 20 66 6e 20 3d 20 72 65 |d if.end| fn = re|
|00003290| 73 75 6c 74 0d 0d 0d 2f | 2f 20 20 20 20 44 45 46 |sult.../|/ DEF|
|000032a0| 20 42 54 4e 52 45 43 54 | 28 72 65 63 74 56 61 72 | BTNRECT|(rectVar|
|000032b0| 2c 62 74 6e 4e 75 6d 29 | 0d 6c 6f 63 61 6c 20 6d |,btnNum)|.local m|
|000032c0| 6f 64 65 0d 72 75 6e 74 | 69 6d 65 20 64 65 66 20 |ode.runt|ime def |
|000032d0| 42 74 6e 52 65 63 74 28 | 20 40 72 50 74 72 20 61 |BtnRect(| @rPtr a|
|000032e0| 73 20 5e 72 65 63 74 2c | 20 62 74 6e 4e 75 6d 20 |s ^rect,| btnNum |
|000032f0| 61 73 20 6c 6f 6e 67 20 | 29 0d 27 7e 27 31 0d 66 |as long |).'~'1.f|
|00003300| 6e 20 47 65 74 43 6f 6e | 74 72 6f 6c 42 6f 75 6e |n GetCon|trolBoun|
|00003310| 64 73 28 20 62 75 74 74 | 6f 6e 26 28 20 62 74 6e |ds( butt|on&( btn|
|00003320| 4e 75 6d 20 29 2c 20 3d | 72 50 74 72 20 29 0d 65 |Num ), =|rPtr ).e|
|00003330| 6e 64 20 66 6e 0d 0d 64 | 65 66 20 66 6e 20 46 42 |nd fn..d|ef fn FB|
|00003340| 46 69 6e 64 45 46 28 20 | 65 66 4e 75 6d 20 61 73 |FindEF( |efNum as|
|00003350| 20 6c 6f 6e 67 2c 20 77 | 68 69 63 68 53 75 62 63 | long, w|hichSubc|
|00003360| 6c 61 73 73 20 61 73 20 | 6c 6f 6e 67 2c 20 77 20 |lass as |long, w |
|00003370| 61 73 20 57 69 6e 64 6f | 77 52 65 66 20 29 20 2f |as Windo|wRef ) /|
|00003380| 2f 20 70 72 6f 74 6f 74 | 79 70 65 0d 0d 2f 2a 0d |/ protot|ype../*.|
|00003390| 20 20 20 20 20 42 55 54 | 54 4f 4e 20 43 4c 4f 53 | BUT|TON CLOS|
|000033a0| 45 20 20 6e 75 6d 0d 20 | 20 20 20 20 42 55 54 54 |E num. | BUTT|
|000033b0| 4f 4e 20 43 4c 4f 53 45 | 20 2d 6e 75 6d 20 20 20 |ON CLOSE| -num |
|000033c0| 20 20 4e 6f 20 45 72 61 | 73 65 20 6f 72 20 49 6e | No Era|se or In|
|000033d0| 76 61 6c 0d 20 20 20 20 | 20 44 69 73 70 6f 73 65 |val. | Dispose|
|000033e0| 20 65 6d 62 65 64 64 65 | 64 20 63 6f 6e 74 72 6f | embedde|d contro|
|000033f0| 6c 73 20 72 65 63 75 72 | 73 69 76 65 6c 79 20 77 |ls recur|sively w|
|00003400| 68 65 6e 20 64 69 73 70 | 6f 73 69 6e 67 20 61 6e |hen disp|osing an|
|00003410| 20 65 6d 62 65 64 64 65 | 72 2e 0d 2a 2f 0d 6c 6f | embedde|r..*/.lo|
|00003420| 63 61 6c 20 6d 6f 64 65 | 0d 64 69 6d 20 40 20 63 |cal mode|.dim @ c|
|00003430| 20 20 20 20 20 20 20 20 | 20 61 73 20 43 6f 6e 74 | | as Cont|
|00003440| 72 6f 6c 52 65 66 0d 64 | 69 6d 20 40 20 63 53 75 |rolRef.d|im @ cSu|
|00003450| 62 20 20 20 20 20 20 61 | 73 20 43 6f 6e 74 72 6f |b a|s Contro|
|00003460| 6c 52 65 66 0d 64 69 6d | 20 62 74 4e 75 6d 53 75 |lRef.dim| btNumSu|
|00003470| 62 20 20 20 20 61 73 20 | 6c 6f 6e 67 0d 64 69 6d |b as |long.dim|
|00003480| 20 69 6e 64 65 78 20 20 | 20 20 20 20 20 61 73 20 | index | as |
|00003490| 6c 6f 6e 67 0d 64 69 6d | 20 72 20 20 20 20 20 20 |long.dim| r |
|000034a0| 20 20 20 20 20 61 73 20 | 72 65 63 74 0d 64 69 6d | as |rect.dim|
|000034b0| 20 77 52 65 66 43 6f 6e | 20 20 20 20 20 61 73 20 | wRefCon| as |
|000034c0| 5e 5e 46 42 77 69 6e 64 | 6f 77 44 65 73 63 72 69 |^^FBwind|owDescri|
|000034d0| 70 74 69 6f 6e 0d 64 69 | 6d 20 63 52 65 66 43 6f |ption.di|m cRefCo|
|000034e0| 6e 20 20 20 20 61 73 20 | 5e 5e 46 42 63 6f 6e 74 |n as |^^FBcont|
|000034f0| 72 6f 6c 44 65 73 63 72 | 69 70 74 69 6f 6e 0d 64 |rolDescr|iption.d|
|00003500| 69 6d 20 65 66 63 48 6e | 64 6c 20 20 20 20 20 61 |im efcHn|dl a|
|00003510| 73 20 43 6f 6e 74 72 6f | 6c 52 65 66 0d 64 69 6d |s Contro|lRef.dim|
|00003520| 20 65 66 63 52 65 66 43 | 6f 6e 20 20 20 61 73 20 | efcRefC|on as |
|00003530| 5e 5e 46 42 63 6f 6e 74 | 72 6f 6c 44 65 73 63 72 |^^FBcont|rolDescr|
|00003540| 69 70 74 69 6f 6e 0d 64 | 69 6d 20 65 6d 62 65 64 |iption.d|im embed|
|00003550| 52 65 66 43 6f 6e 20 61 | 73 20 5e 5e 46 42 63 6f |RefCon a|s ^^FBco|
|00003560| 6e 74 72 6f 6c 44 65 73 | 63 72 69 70 74 69 6f 6e |ntrolDes|cription|
|00003570| 0d 64 69 6d 20 40 20 70 | 6f 72 74 20 20 20 20 20 |.dim @ p|ort |
|00003580| 20 61 73 20 43 47 72 61 | 66 50 74 72 0d 64 69 6d | as CGra|fPtr.dim|
|00003590| 20 40 20 77 20 20 20 20 | 20 20 20 20 20 61 73 20 | @ w | as |
|000035a0| 57 69 6e 64 6f 77 52 65 | 66 0d 64 69 6d 20 40 20 |WindowRe|f.dim @ |
|000035b0| 77 4e 75 6d 20 20 20 20 | 20 20 61 73 20 6c 6f 6e |wNum | as lon|
|000035c0| 67 0d 64 69 6d 20 6f 73 | 53 74 61 74 75 73 20 20 |g.dim os|Status |
|000035d0| 20 20 61 73 20 4f 53 53 | 74 61 74 75 73 0d 64 69 | as OSS|tatus.di|
|000035e0| 6d 20 40 20 63 6f 75 6e | 74 20 20 20 20 20 61 73 |m @ coun|t as|
|000035f0| 20 73 68 6f 72 74 0d 64 | 69 6d 20 65 72 61 73 65 | short.d|im erase|
|00003600| 20 20 20 20 20 20 20 61 | 73 20 62 6f 6f 6c 65 61 | a|s boolea|
|00003610| 6e 0d 64 69 6d 20 26 0d | 72 75 6e 74 69 6d 65 20 |n.dim &.|runtime |
|00003620| 46 42 42 75 74 74 6f 6e | 43 6c 6f 73 65 28 20 62 |FBButton|Close( b|
|00003630| 74 6e 4e 75 6d 20 61 73 | 20 6c 6f 6e 67 20 29 0d |tnNum as| long ).|
|00003640| 27 7e 27 31 0d 66 6e 20 | 46 42 67 65 74 43 75 72 |'~'1.fn |FBgetCur|
|00003650| 57 6e 64 49 6e 66 6f 28 | 20 70 6f 72 74 2c 20 77 |WndInfo(| port, w|
|00003660| 2c 20 77 4e 75 6d 20 29 | 0d 6c 6f 6e 67 20 69 66 |, wNum )|.long if|
|00003670| 20 77 4e 75 6d 0d 0d 65 | 72 61 73 65 20 3d 20 28 | wNum..e|rase = (|
|00003680| 20 62 74 6e 4e 75 6d 20 | 3e 20 30 20 29 0d 62 74 | btnNum |> 0 ).bt|
|00003690| 6e 4e 75 6d 20 20 3d 20 | 61 62 73 28 20 62 74 6e |nNum = |abs( btn|
|000036a0| 4e 75 6d 20 29 0d 0d 63 | 20 3d 20 66 6e 20 46 69 |Num )..c| = fn Fi|
|000036b0| 6e 64 46 42 42 74 6e 43 | 6f 6e 74 72 6f 6c 28 20 |ndFBBtnC|ontrol( |
|000036c0| 77 2c 20 62 74 6e 4e 75 | 6d 20 29 0d 6c 6f 6e 67 |w, btnNu|m ).long|
|000036d0| 20 69 66 20 63 0d 6c 6f | 6e 67 20 69 66 20 66 6e | if c.lo|ng if fn|
|000036e0| 20 43 6f 75 6e 74 53 75 | 62 63 6f 6e 74 72 6f 6c | CountSu|bcontrol|
|000036f0| 73 28 20 63 2c 20 63 6f | 75 6e 74 20 29 20 3d 3d |s( c, co|unt ) ==|
|00003700| 20 5f 6e 6f 45 72 72 0d | 69 6e 64 65 78 20 3d 20 | _noErr.|index = |
|00003710| 31 0d 77 68 69 6c 65 20 | 69 6e 64 65 78 20 3c 3d |1.while |index <=|
|00003720| 20 63 6f 75 6e 74 0d 6c | 6f 6e 67 20 69 66 20 66 | count.l|ong if f|
|00003730| 6e 20 47 65 74 49 6e 64 | 65 78 65 64 53 75 62 63 |n GetInd|exedSubc|
|00003740| 6f 6e 74 72 6f 6c 28 20 | 63 2c 20 69 6e 64 65 78 |ontrol( |c, index|
|00003750| 2c 20 63 53 75 62 20 29 | 20 3d 3d 20 5f 6e 6f 45 |, cSub )| == _noE|
|00003760| 72 72 0d 62 74 4e 75 6d | 53 75 62 20 3d 20 66 6e |rr.btNum|Sub = fn|
|00003770| 20 46 42 67 65 74 43 6f | 6e 74 72 6f 6c 52 65 66 | FBgetCo|ntrolRef|
|00003780| 28 20 63 53 75 62 20 29 | 0d 0d 2f 2f 2f 73 74 6f |( cSub )|..///sto|
|00003790| 70 20 22 62 74 4e 75 6d | 53 75 62 3d 22 20 2b 73 |p "btNum|Sub=" +s|
|000037a0| 74 72 24 28 62 74 4e 75 | 6d 53 75 62 29 27 44 61 |tr$(btNu|mSub)'Da|
|000037b0| 74 65 20 7b 20 33 2f 35 | 2f 30 32 20 7d 0d 0d 69 |te { 3/5|/02 }..i|
|000037c0| 66 20 62 74 4e 75 6d 53 | 75 62 20 74 68 65 6e 20 |f btNumS|ub then |
|000037d0| 62 75 74 74 6f 6e 20 63 | 6c 6f 73 65 20 62 74 4e |button c|lose btN|
|000037e0| 75 6d 53 75 62 0d 65 6e | 64 20 69 66 0d 69 6e 64 |umSub.en|d if.ind|
|000037f0| 65 78 2b 2b 0d 77 65 6e | 64 0d 65 6e 64 20 69 66 |ex++.wen|d.end if|
|00003800| 0d 0d 63 52 65 66 43 6f | 6e 20 3d 20 66 6e 20 47 |..cRefCo|n = fn G|
|00003810| 65 74 43 52 65 66 43 6f | 6e 28 20 63 20 29 0d 6c |etCRefCo|n( c ).l|
|00003820| 6f 6e 67 20 69 66 20 63 | 52 65 66 43 6f 6e 2e 2e |ong if c|RefCon..|
|00003830| 46 42 74 65 48 6e 64 6c | 20 2f 2f 20 74 68 65 72 |FBteHndl| // ther|
|00003840| 65 20 69 73 20 61 20 6c | 69 6e 6b 65 64 20 45 46 |e is a l|inked EF|
|00003850| 0d 65 66 63 48 6e 64 6c | 20 3d 20 66 6e 20 46 42 |.efcHndl| = fn FB|
|00003860| 46 69 6e 64 45 46 28 20 | 62 74 6e 4e 75 6d 2c 20 |FindEF( |btnNum, |
|00003870| 5f 61 6c 6c 45 46 53 75 | 62 43 6c 61 73 73 65 73 |_allEFSu|bClasses|
|00003880| 2c 20 77 20 29 0d 6c 6f | 6e 67 20 69 66 20 65 66 |, w ).lo|ng if ef|
|00003890| 63 48 6e 64 6c 0d 65 66 | 63 52 65 66 43 6f 6e 20 |cHndl.ef|cRefCon |
|000038a0| 3d 20 66 6e 20 47 65 74 | 43 52 65 66 43 6f 6e 28 |= fn Get|CRefCon(|
|000038b0| 20 65 66 63 48 6e 64 6c | 20 29 0d 69 66 20 66 6e | efcHndl| ).if fn|
|000038c0| 20 49 73 43 52 65 66 43 | 6f 6e 46 42 48 61 6e 64 | IsCRefC|onFBHand|
|000038d0| 6c 65 28 20 65 66 63 52 | 65 66 43 6f 6e 20 29 20 |le( efcR|efCon ) |
|000038e0| 74 68 65 6e 20 65 66 63 | 52 65 66 43 6f 6e 2e 2e |then efc|RefCon..|
|000038f0| 46 42 65 66 4c 69 6e 6b | 63 48 6e 64 6c 20 3d 20 |FBefLink|cHndl = |
|00003900| 30 20 2f 2f 20 73 6f 20 | 45 46 20 6b 6e 6f 77 73 |0 // so |EF knows|
|00003910| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 77 20 6e 6f | there i|s now no|
|00003920| 20 73 63 72 6f 6c 6c 20 | 62 61 72 0d 65 6e 64 20 | scroll |bar.end |
|00003930| 69 66 0d 65 6e 64 20 69 | 66 0d 0d 2f 2f 20 72 65 |if.end i|f..// re|
|00003940| 73 74 6f 72 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |store sc|roll bar|
|00003950| 20 61 72 65 61 20 74 6f | 20 63 6c 69 70 2c 20 61 | area to| clip, a|
|00003960| 6e 64 20 72 65 6d 6f 76 | 65 20 63 6f 70 79 20 6f |nd remov|e copy o|
|00003970| 66 20 76 65 72 74 2f 68 | 6f 72 7a 20 73 63 72 6f |f vert/h|orz scro|
|00003980| 6c 6c 20 62 61 72 20 68 | 61 6e 64 6c 65 20 66 72 |ll bar h|andle fr|
|00003990| 6f 6d 20 77 52 65 66 43 | 6f 6e 0d 73 65 6c 65 63 |om wRefC|on.selec|
|000039a0| 74 20 63 52 65 66 43 6f | 6e 2e 2e 46 42 63 6e 74 |t cRefCo|n..FBcnt|
|000039b0| 72 6c 53 75 62 63 6c 61 | 73 73 0d 63 61 73 65 20 |rlSubcla|ss.case |
|000039c0| 5f 76 65 72 74 53 63 72 | 6f 6c 6c 53 75 62 63 6c |_vertScr|ollSubcl|
|000039d0| 61 73 73 0d 66 6e 20 52 | 65 73 74 6f 72 65 53 63 |ass.fn R|estoreSc|
|000039e0| 72 6f 6c 6c 52 67 6e 54 | 6f 43 6c 69 70 52 67 6e |rollRgnT|oClipRgn|
|000039f0| 28 20 77 2c 20 63 2c 20 | 5f 73 63 72 6f 6c 6c 56 |( w, c, |_scrollV|
|00003a00| 65 72 74 20 29 0d 77 52 | 65 66 43 6f 6e 20 3d 20 |ert ).wR|efCon = |
|00003a10| 66 6e 20 47 65 74 57 52 | 65 66 43 6f 6e 28 20 77 |fn GetWR|efCon( w|
|00003a20| 20 29 0d 77 52 65 66 43 | 6f 6e 2e 2e 46 42 77 56 | ).wRefC|on..FBwV|
|00003a30| 53 63 72 6f 6c 6c 48 20 | 3d 20 30 0d 63 61 73 65 |ScrollH |= 0.case|
|00003a40| 20 5f 68 6f 72 7a 53 63 | 72 6f 6c 6c 53 75 62 63 | _horzSc|rollSubc|
|00003a50| 6c 61 73 73 0d 66 6e 20 | 52 65 73 74 6f 72 65 53 |lass.fn |RestoreS|
|00003a60| 63 72 6f 6c 6c 52 67 6e | 54 6f 43 6c 69 70 52 67 |crollRgn|ToClipRg|
|00003a70| 6e 28 20 77 2c 20 63 2c | 20 5f 73 63 72 6f 6c 6c |n( w, c,| _scroll|
|00003a80| 48 6f 72 7a 20 29 0d 77 | 52 65 66 43 6f 6e 20 3d |Horz ).w|RefCon =|
|00003a90| 20 66 6e 20 47 65 74 57 | 52 65 66 43 6f 6e 28 20 | fn GetW|RefCon( |
|00003aa0| 77 20 29 0d 77 52 65 66 | 43 6f 6e 2e 2e 46 42 77 |w ).wRef|Con..FBw|
|00003ab0| 48 53 63 72 6f 6c 6c 48 | 20 3d 20 30 0d 63 61 73 |HScrollH| = 0.cas|
|00003ac0| 65 20 5f 6f 74 68 65 72 | 53 63 72 6f 6c 6c 53 75 |e _other|ScrollSu|
|00003ad0| 62 63 6c 61 73 73 0d 66 | 6e 20 52 65 73 74 6f 72 |bclass.f|n Restor|
|00003ae0| 65 53 63 72 6f 6c 6c 52 | 67 6e 54 6f 43 6c 69 70 |eScrollR|gnToClip|
|00003af0| 52 67 6e 28 20 77 2c 20 | 63 2c 20 5f 73 63 72 6f |Rgn( w, |c, _scro|
|00003b00| 6c 6c 4f 74 68 65 72 20 | 29 0d 65 6e 64 20 73 65 |llOther |).end se|
|00003b10| 6c 65 63 74 0d 0d 66 6e | 20 47 65 74 43 6f 6e 74 |lect..fn| GetCont|
|00003b20| 72 6f 6c 42 6f 75 6e 64 | 73 28 20 63 2c 20 72 20 |rolBound|s( c, r |
|00003b30| 29 0d 44 69 73 70 6f 73 | 65 48 61 6e 64 6c 65 28 |).Dispos|eHandle(|
|00003b40| 20 63 52 65 66 43 6f 6e | 20 29 0d 44 69 73 70 6f | cRefCon| ).Dispo|
|00003b50| 73 65 43 6f 6e 74 72 6f | 6c 28 20 63 20 29 20 2f |seContro|l( c ) /|
|00003b60| 2f 20 72 65 70 61 69 6e | 74 73 20 69 6e 20 70 6f |/ repain|ts in po|
|00003b70| 72 74 27 73 20 62 61 63 | 6b 20 28 6f 72 20 66 69 |rt's bac|k (or fi|
|00003b80| 6c 6c 3f 29 20 63 6f 6c | 6f 72 0d 0d 66 6e 20 52 |ll?) col|or..fn R|
|00003b90| 65 6d 6f 76 65 46 42 43 | 6f 6e 74 72 6f 6c 46 72 |emoveFBC|ontrolFr|
|00003ba0| 6f 6d 4c 69 73 74 28 20 | 77 2c 20 63 20 29 0d 0d |omList( |w, c )..|
|00003bb0| 6c 6f 6e 67 20 69 66 20 | 65 72 61 73 65 0d 2f 2f |long if |erase.//|
|00003bc0| 45 72 61 73 65 52 65 63 | 74 28 20 72 20 29 20 2f |EraseRec|t( r ) /|
|00003bd0| 2f 20 74 68 65 73 65 20 | 68 61 70 70 65 6e 20 61 |/ these |happen a|
|00003be0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 0d 2f 2f 49 |utomatic|ally.//I|
|00003bf0| 6e 76 61 6c 52 65 63 74 | 28 20 72 20 29 0d 78 65 |nvalRect|( r ).xe|
|00003c00| 6c 73 65 0d 6f 73 53 74 | 61 74 75 73 20 3d 20 66 |lse.osSt|atus = f|
|00003c10| 6e 20 56 61 6c 69 64 57 | 69 6e 64 6f 77 52 65 63 |n ValidW|indowRec|
|00003c20| 74 28 20 77 2c 20 72 20 | 29 20 2f 2f 20 70 72 65 |t( w, r |) // pre|
|00003c30| 76 65 6e 74 20 72 65 66 | 72 65 73 68 3b 20 66 61 |vent ref|resh; fa|
|00003c40| 74 20 68 6f 70 65 20 69 | 6e 20 4f 53 20 58 0d 65 |t hope i|n OS X.e|
|00003c50| 6e 64 20 69 66 0d 65 6e | 64 20 69 66 0d 65 6e 64 |nd if.en|d if.end|
|00003c60| 20 69 66 0d 65 6e 64 20 | 66 6e 0d 0d 0d 0d 2f 2f | if.end |fn....//|
|00003c70| 20 52 65 63 65 69 76 65 | 20 61 20 6e 6f 6d 69 6e | Receive| a nomin|
|00003c80| 61 6c 20 72 65 63 74 20 | 66 6f 72 20 61 20 77 69 |al rect |for a wi|
|00003c90| 6e 64 6f 77 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 |ndow scr|oll bar |
|00003ca0| 20 61 6e 64 20 6d 6f 64 | 69 66 79 20 69 74 20 74 | and mod|ify it t|
|00003cb0| 6f 20 62 65 20 69 6e 20 | 74 68 65 20 72 69 67 68 |o be in |the righ|
|00003cc0| 74 20 70 6c 61 63 65 0d | 2f 2f 20 66 6f 72 20 5f |t place.|// for _|
|00003cd0| 73 63 72 6f 6c 6c 56 65 | 72 74 20 6f 72 20 5f 73 |scrollVe|rt or _s|
|00003ce0| 63 72 6f 6c 6c 48 6f 72 | 7a 0d 6c 6f 63 61 6c 0d |crollHor|z.local.|
|00003cf0| 64 69 6d 20 72 20 20 20 | 20 20 20 20 20 61 73 20 |dim r | as |
|00003d00| 72 65 63 74 0d 64 69 6d | 20 70 74 20 20 20 20 20 |rect.dim| pt |
|00003d10| 20 20 61 73 20 70 6f 69 | 6e 74 0d 64 69 6d 20 40 | as poi|nt.dim @|
|00003d20| 20 73 69 7a 65 20 20 20 | 61 73 20 6c 6f 6e 67 0d | size |as long.|
|00003d30| 64 69 6d 20 6f 73 53 74 | 61 74 75 73 20 61 73 20 |dim osSt|atus as |
|00003d40| 4f 53 53 74 61 74 75 73 | 0d 64 69 6d 20 6b 65 65 |OSStatus|.dim kee|
|00003d50| 70 20 20 20 20 20 61 73 | 20 73 68 6f 72 74 0d 64 |p as| short.d|
|00003d60| 69 6d 20 26 0d 6c 6f 63 | 61 6c 20 66 6e 20 47 65 |im &.loc|al fn Ge|
|00003d70| 74 53 63 72 6c 52 65 63 | 74 46 42 28 20 73 63 72 |tScrlRec|tFB( scr|
|00003d80| 6c 54 79 70 65 20 61 73 | 20 6c 6f 6e 67 2c 20 73 |lType as| long, s|
|00003d90| 63 72 6c 52 65 63 74 20 | 61 73 20 5e 72 65 63 74 |crlRect |as ^rect|
|00003da0| 2c 20 70 6f 72 74 52 65 | 63 74 20 61 73 20 5e 72 |, portRe|ct as ^r|
|00003db0| 65 63 74 2c 20 63 61 6e | 47 72 6f 77 20 61 73 20 |ect, can|Grow as |
|00003dc0| 62 6f 6f 6c 65 61 6e 2c | 20 77 63 20 61 73 20 57 |boolean,| wc as W|
|00003dd0| 69 6e 64 6f 77 43 6c 61 | 73 73 20 29 0d 27 7e 27 |indowCla|ss ).'~'|
|00003de0| 31 0d 70 74 2e 68 25 20 | 3d 20 30 0d 70 74 2e 76 |1.pt.h% |= 0.pt.v|
|00003df0| 25 20 3d 20 30 0d 0d 23 | 69 66 20 43 61 72 62 6f |% = 0..#|if Carbo|
|00003e00| 6e 4c 69 62 0d 6c 6f 6e | 67 20 69 66 20 77 63 20 |nLib.lon|g if wc |
|00003e10| 3d 3d 20 5f 6b 46 6c 6f | 61 74 69 6e 67 57 69 6e |== _kFlo|atingWin|
|00003e20| 64 6f 77 43 6c 61 73 73 | 0d 6f 73 53 74 61 74 75 |dowClass|.osStatu|
|00003e30| 73 20 3d 20 66 6e 20 47 | 65 74 54 68 65 6d 65 4d |s = fn G|etThemeM|
|00003e40| 65 74 72 69 63 28 5f 6b | 54 68 65 6d 65 4d 65 74 |etric(_k|ThemeMet|
|00003e50| 72 69 63 53 6d 61 6c 6c | 53 63 72 6f 6c 6c 42 61 |ricSmall|ScrollBa|
|00003e60| 72 57 69 64 74 68 2c 20 | 73 69 7a 65 20 29 0d 78 |rWidth, |size ).x|
|00003e70| 65 6c 73 65 0d 6f 73 53 | 74 61 74 75 73 20 3d 20 |else.osS|tatus = |
|00003e80| 66 6e 20 47 65 74 54 68 | 65 6d 65 4d 65 74 72 69 |fn GetTh|emeMetri|
|00003e90| 63 28 5f 6b 54 68 65 6d | 65 4d 65 74 72 69 63 53 |c(_kThem|eMetricS|
|00003ea0| 63 72 6f 6c 6c 42 61 72 | 57 69 64 74 68 2c 20 73 |crollBar|Width, s|
|00003eb0| 69 7a 65 20 29 0d 65 6e | 64 20 69 66 0d 69 66 20 |ize ).en|d if.if |
|00003ec0| 67 46 42 53 79 73 74 65 | 6d 56 65 72 73 69 6f 6e |gFBSyste|mVersion|
|00003ed0| 48 65 78 20 3c 20 30 78 | 31 30 30 30 20 74 68 65 |Hex < 0x|1000 the|
|00003ee0| 6e 20 73 69 7a 65 2d 2d | 0d 23 65 6c 73 65 0d 6f |n size--|.#else.o|
|00003ef0| 73 53 74 61 74 75 73 20 | 3d 20 66 6e 20 47 65 74 |sStatus |= fn Get|
|00003f00| 54 68 65 6d 65 53 74 61 | 6e 64 61 6c 6f 6e 65 47 |ThemeSta|ndaloneG|
|00003f10| 72 6f 77 42 6f 78 42 6f | 75 6e 64 73 28 70 74 2c |rowBoxBo|unds(pt,|
|00003f20| 20 30 2c 20 77 63 20 3d | 3d 20 5f 6b 46 6c 6f 61 | 0, wc =|= _kFloa|
|00003f30| 74 69 6e 67 57 69 6e 64 | 6f 77 43 6c 61 73 73 2c |tingWind|owClass,|
|00003f40| 20 72 20 29 0d 73 69 7a | 65 20 3d 20 72 2e 72 69 | r ).siz|e = r.ri|
|00003f50| 67 68 74 20 2d 20 72 2e | 6c 65 66 74 20 20 2d 20 |ght - r.|left - |
|00003f60| 31 0d 23 65 6e 64 69 66 | 0d 0d 73 65 6c 65 63 74 |1.#endif|..select|
|00003f70| 20 63 61 73 65 20 20 73 | 63 72 6c 54 79 70 65 0d | case s|crlType.|
|00003f80| 63 61 73 65 20 5f 76 65 | 72 74 53 63 72 6f 6c 6c |case _ve|rtScroll|
|00003f90| 53 75 62 63 6c 61 73 73 | 20 2f 2f 20 6b 65 65 70 |Subclass| // keep|
|00003fa0| 20 61 6e 64 20 68 6f 6e | 6f 75 72 20 74 68 65 52 | and hon|our theR|
|00003fb0| 65 63 74 2e 74 6f 70 20 | 6f 6e 6c 79 0d 6b 65 65 |ect.top |only.kee|
|00003fc0| 70 20 3d 20 73 63 72 6c | 52 65 63 74 2e 74 6f 70 |p = scrl|Rect.top|
|00003fd0| 0d 42 6c 6f 63 6b 4d 6f | 76 65 20 70 6f 72 74 52 |.BlockMo|ve portR|
|00003fe0| 65 63 74 2c 20 73 63 72 | 6c 52 65 63 74 2c 20 38 |ect, scr|lRect, 8|
|00003ff0| 0d 73 63 72 6c 52 65 63 | 74 2e 74 6f 70 20 20 3d |.scrlRec|t.top =|
|00004000| 20 6b 65 65 70 0d 73 63 | 72 6c 52 65 63 74 2e 6c | keep.sc|rlRect.l|
|00004010| 65 66 74 20 3d 20 73 63 | 72 6c 52 65 63 74 2e 72 |eft = sc|rlRect.r|
|00004020| 69 67 68 74 20 2d 20 73 | 69 7a 65 20 0d 69 66 20 |ight - s|ize .if |
|00004030| 63 61 6e 47 72 6f 77 20 | 74 68 65 6e 20 73 63 72 |canGrow |then scr|
|00004040| 6c 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 3d 20 73 |lRect.bo|ttom = s|
|00004050| 63 72 6c 52 65 63 74 2e | 62 6f 74 74 6f 6d 20 2d |crlRect.|bottom -|
|00004060| 20 73 69 7a 65 0d 73 63 | 72 6c 52 65 63 74 2e 62 | size.sc|rlRect.b|
|00004070| 6f 74 74 6f 6d 2b 2b 0d | 73 63 72 6c 52 65 63 74 |ottom++.|scrlRect|
|00004080| 2e 72 69 67 68 74 2b 2b | 0d 63 61 73 65 20 5f 68 |.right++|.case _h|
|00004090| 6f 72 7a 53 63 72 6f 6c | 6c 53 75 62 63 6c 61 73 |orzScrol|lSubclas|
|000040a0| 73 2f 2f 20 6b 65 65 70 | 20 61 6e 64 20 68 6f 6e |s// keep| and hon|
|000040b0| 6f 75 72 20 74 68 65 52 | 65 63 74 2e 6c 65 66 74 |our theR|ect.left|
|000040c0| 20 6f 6e 6c 79 0d 6b 65 | 65 70 20 3d 20 73 63 72 | only.ke|ep = scr|
|000040d0| 6c 52 65 63 74 2e 6c 65 | 66 74 0d 42 6c 6f 63 6b |lRect.le|ft.Block|
|000040e0| 4d 6f 76 65 20 70 6f 72 | 74 52 65 63 74 2c 20 73 |Move por|tRect, s|
|000040f0| 63 72 6c 52 65 63 74 2c | 20 38 0d 73 63 72 6c 52 |crlRect,| 8.scrlR|
|00004100| 65 63 74 2e 6c 65 66 74 | 20 3d 20 6b 65 65 70 0d |ect.left| = keep.|
|00004110| 73 63 72 6c 52 65 63 74 | 2e 74 6f 70 20 20 3d 20 |scrlRect|.top = |
|00004120| 73 63 72 6c 52 65 63 74 | 2e 62 6f 74 74 6f 6d 20 |scrlRect|.bottom |
|00004130| 2d 20 73 69 7a 65 0d 69 | 66 20 63 61 6e 47 72 6f |- size.i|f canGro|
|00004140| 77 20 74 68 65 6e 20 73 | 63 72 6c 52 65 63 74 2e |w then s|crlRect.|
|00004150| 72 69 67 68 74 20 3d 20 | 73 63 72 6c 52 65 63 74 |right = |scrlRect|
|00004160| 2e 72 69 67 68 74 20 2d | 20 73 69 7a 65 0d 73 63 |.right -| size.sc|
|00004170| 72 6c 52 65 63 74 2e 72 | 69 67 68 74 2b 2b 0d 73 |rlRect.r|ight++.s|
|00004180| 63 72 6c 52 65 63 74 2e | 62 6f 74 74 6f 6d 2b 2b |crlRect.|bottom++|
|00004190| 0d 65 6e 64 20 73 65 6c | 65 63 74 0d 0d 65 6e 64 |.end sel|ect..end|
|000041a0| 20 66 6e 0d 0d 0d 2f 2f | 20 20 53 43 52 4f 4c 4c | fn...//| SCROLL|
|000041b0| 20 42 55 54 54 4f 4e 20 | 5b 23 5d 6e 75 6d 5b 2c | BUTTON |[#]num[,|
|000041c0| 63 75 72 5d 5b 2c 6d 69 | 6e 5d 5b 2c 6d 61 78 5d |cur][,mi|n][,max]|
|000041d0| 5b 2c 70 61 67 65 5d 5b | 2c 72 65 63 74 5d 5b 2c |[,page][|,rect][,|
|000041e0| 74 79 70 65 5d 0d 6c 6f | 63 61 6c 20 6d 6f 64 65 |type].lo|cal mode|
|000041f0| 0d 64 69 6d 20 40 20 70 | 6f 72 74 20 20 20 20 61 |.dim @ p|ort a|
|00004200| 73 20 43 47 72 61 66 50 | 74 72 0d 64 69 6d 20 40 |s CGrafP|tr.dim @|
|00004210| 20 77 20 20 20 20 20 20 | 20 61 73 20 57 69 6e 64 | w | as Wind|
|00004220| 6f 77 52 65 66 0d 64 69 | 6d 20 40 20 77 4e 75 6d |owRef.di|m @ wNum|
|00004230| 20 20 20 20 61 73 20 6c | 6f 6e 67 0d 64 69 6d 20 | as l|ong.dim |
|00004240| 77 52 65 66 43 6f 6e 20 | 20 20 61 73 20 5e 5e 46 |wRefCon | as ^^F|
|00004250| 42 77 69 6e 64 6f 77 44 | 65 73 63 72 69 70 74 69 |BwindowD|escripti|
|00004260| 6f 6e 0d 64 69 6d 20 63 | 20 20 20 20 20 20 20 20 |on.dim c| |
|00004270| 20 61 73 20 43 6f 6e 74 | 72 6f 6c 52 65 66 0d 64 | as Cont|rolRef.d|
|00004280| 69 6d 20 65 66 63 48 6e | 64 6c 20 20 20 61 73 20 |im efcHn|dl as |
|00004290| 43 6f 6e 74 72 6f 6c 52 | 65 66 20 2f 2f 20 63 48 |ControlR|ef // cH|
|000042a0| 6e 64 6c 20 6f 66 20 6c | 69 6e 6b 65 64 20 45 46 |ndl of l|inked EF|
|000042b0| 20 70 61 6e 65 0d 64 69 | 6d 20 54 45 48 6e 64 6c | pane.di|m TEHndl|
|000042c0| 20 20 20 20 61 73 20 68 | 61 6e 64 6c 65 0d 64 69 | as h|andle.di|
|000042d0| 6d 20 63 52 65 66 43 6f | 6e 20 20 20 61 73 20 5e |m cRefCo|n as ^|
|000042e0| 5e 46 42 63 6f 6e 74 72 | 6f 6c 44 65 73 63 72 69 |^FBcontr|olDescri|
|000042f0| 70 74 69 6f 6e 0d 64 69 | 6d 20 65 66 63 52 65 66 |ption.di|m efcRef|
|00004300| 43 6f 6e 20 61 73 20 5e | 5e 46 42 63 6f 6e 74 72 |Con as ^|^FBcontr|
|00004310| 6f 6c 44 65 73 63 72 69 | 70 74 69 6f 6e 20 2f 2f |olDescri|ption //|
|00004320| 20 63 52 65 66 43 6f 6e | 20 6f 66 20 6c 69 6e 6b | cRefCon| of link|
|00004330| 65 64 20 45 46 20 70 61 | 6e 65 0d 64 69 6d 20 72 |ed EF pa|ne.dim r|
|00004340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 61 73 20 | | as |
|00004350| 72 65 63 74 0d 64 69 6d | 20 70 6f 72 74 52 65 63 |rect.dim| portRec|
|00004360| 74 20 20 20 20 20 20 61 | 73 20 72 65 63 74 0d 64 |t a|s rect.d|
|00004370| 69 6d 20 6f 6c 64 52 20 | 20 20 20 20 20 20 20 20 |im oldR | |
|00004380| 20 61 73 20 72 65 63 74 | 0d 64 69 6d 20 6f 73 53 | as rect|.dim osS|
|00004390| 74 61 74 75 73 20 20 20 | 20 20 20 61 73 20 4f 53 |tatus | as OS|
|000043a0| 53 74 61 74 75 73 0d 64 | 69 6d 20 69 73 46 6c 6f |Status.d|im isFlo|
|000043b0| 61 74 69 6e 67 57 6e 64 | 20 61 73 20 62 6f 6f 6c |atingWnd| as bool|
|000043c0| 65 61 6e 0d 64 69 6d 20 | 72 65 64 72 61 77 20 20 |ean.dim |redraw |
|000043d0| 20 20 20 20 20 20 61 73 | 20 62 6f 6f 6c 65 61 6e | as| boolean|
|000043e0| 0d 64 69 6d 20 26 0d 72 | 75 6e 74 69 6d 65 20 46 |.dim &.r|untime F|
|000043f0| 42 53 63 72 6f 6c 6c 42 | 75 74 74 6f 6e 28 20 62 |BScrollB|utton( b|
|00004400| 74 6e 4e 75 6d 20 61 73 | 20 6c 6f 6e 67 2c 20 63 |tnNum as| long, c|
|00004410| 56 61 6c 75 65 20 61 73 | 20 6c 6f 6e 67 2c 20 63 |Value as| long, c|
|00004420| 4d 69 6e 56 61 6c 20 61 | 73 20 6c 6f 6e 67 2c 20 |MinVal a|s long, |
|00004430| 63 4d 61 78 56 61 6c 20 | 61 73 20 6c 6f 6e 67 2c |cMaxVal |as long,|
|00004440| 20 63 50 61 67 65 20 61 | 73 20 6c 6f 6e 67 2c 20 | cPage a|s long, |
|00004450| 63 52 65 63 74 50 74 72 | 20 61 73 20 5e 72 65 63 |cRectPtr| as ^rec|
|00004460| 74 2c 20 73 54 79 70 65 | 20 61 73 20 6c 6f 6e 67 |t, sType| as long|
|00004470| 20 29 0d 0d 66 6e 20 46 | 42 67 65 74 43 75 72 57 | )..fn F|BgetCurW|
|00004480| 6e 64 49 6e 66 6f 28 20 | 70 6f 72 74 2c 20 77 2c |ndInfo( |port, w,|
|00004490| 20 77 4e 75 6d 20 29 0d | 69 66 20 77 4e 75 6d 20 | wNum ).|if wNum |
|000044a0| 3d 3d 20 30 20 74 68 65 | 6e 20 65 78 69 74 20 66 |== 0 the|n exit f|
|000044b0| 6e 20 2f 2f 20 62 61 69 | 6c 3b 20 6e 6f 20 76 61 |n // bai|l; no va|
|000044c0| 6c 69 64 20 46 42 20 57 | 69 6e 64 6f 77 0d 0d 66 |lid FB W|indow..f|
|000044d0| 6e 20 47 65 74 57 69 6e | 64 6f 77 50 6f 72 74 42 |n GetWin|dowPortB|
|000044e0| 6f 75 6e 64 73 28 20 77 | 2c 20 70 6f 72 74 52 65 |ounds( w|, portRe|
|000044f0| 63 74 20 29 0d 0d 6c 6f | 6e 67 20 69 66 20 63 52 |ct )..lo|ng if cR|
|00004500| 65 63 74 50 74 72 20 2f | 2f 20 72 65 63 74 20 53 |ectPtr /|/ rect S|
|00004510| 70 65 63 69 66 69 65 64 | 0d 72 20 3d 20 63 52 65 |pecified|.r = cRe|
|00004520| 63 74 50 74 72 20 2f 2f | 20 63 6f 70 79 20 74 6f |ctPtr //| copy to|
|00004530| 20 6c 6f 63 61 6c 0d 78 | 65 6c 73 65 0d 72 20 3d | local.x|else.r =|
|00004540| 20 70 6f 72 74 52 65 63 | 74 0d 72 2e 74 6f 70 2d | portRec|t.r.top-|
|00004550| 2d 0d 72 2e 6c 65 66 74 | 2d 2d 0d 65 6e 64 20 69 |-.r.left|--.end i|
|00004560| 66 0d 0d 63 20 3d 20 66 | 6e 20 46 69 6e 64 46 42 |f..c = f|n FindFB|
|00004570| 42 74 6e 43 6f 6e 74 72 | 6f 6c 28 20 77 2c 20 62 |BtnContr|ol( w, b|
|00004580| 74 6e 4e 75 6d 20 29 0d | 0d 6c 6f 6e 67 20 69 66 |tnNum ).|.long if|
|00004590| 20 28 20 63 20 3d 3d 20 | 30 20 29 2f 2f 20 6e 65 | ( c == |0 )// ne|
|000045a0| 77 20 63 6f 6e 74 72 6f | 6c 3f 0d 0d 0d 77 52 65 |w contro|l?...wRe|
|000045b0| 66 43 6f 6e 20 3d 20 66 | 6e 20 47 65 74 57 52 65 |fCon = f|n GetWRe|
|000045c0| 66 43 6f 6e 28 20 77 20 | 29 0d 23 69 66 20 5f 61 |fCon( w |).#if _a|
|000045d0| 73 73 65 72 74 69 6f 6e | 73 46 42 0d 69 66 20 28 |ssertion|sFB.if (|
|000045e0| 20 77 52 65 66 43 6f 6e | 20 21 3d 20 30 20 29 20 | wRefCon| != 0 ) |
|000045f0| 3d 3d 20 5f 66 61 6c 73 | 65 20 74 68 65 6e 20 73 |== _fals|e then s|
|00004600| 74 6f 70 20 5f 61 73 73 | 65 72 74 46 42 24 20 2b |top _ass|ertFB$ +|
|00004610| 20 22 66 77 52 65 66 43 | 6f 6e 20 21 3d 20 30 22 | "fwRefC|on != 0"|
|00004620| 0d 23 65 6e 64 69 66 0d | 0d 73 65 6c 65 63 74 20 |.#endif.|.select |
|00004630| 73 54 79 70 65 20 2f 2f | 20 63 6f 6e 76 65 72 74 |sType //| convert|
|00004640| 20 74 6f 20 53 75 62 63 | 6c 61 73 73 0d 63 61 73 | to Subc|lass.cas|
|00004650| 65 20 5f 73 63 72 6f 6c | 6c 56 65 72 74 0d 73 54 |e _scrol|lVert.sT|
|00004660| 79 70 65 20 3d 20 5f 76 | 65 72 74 53 63 72 6f 6c |ype = _v|ertScrol|
|00004670| 6c 53 75 62 63 6c 61 73 | 73 0d 66 6e 20 47 65 74 |lSubclas|s.fn Get|
|00004680| 53 63 72 6c 52 65 63 74 | 46 42 28 20 73 54 79 70 |ScrlRect|FB( sTyp|
|00004690| 65 2c 20 72 2c 20 70 6f | 72 74 52 65 63 74 2c 20 |e, r, po|rtRect, |
|000046a0| 66 6e 20 46 42 43 61 6e | 47 72 6f 77 28 20 77 20 |fn FBCan|Grow( w |
|000046b0| 29 2c 20 77 52 65 66 43 | 6f 6e 2e 2e 46 42 77 57 |), wRefC|on..FBwW|
|000046c0| 69 6e 64 6f 77 43 6c 61 | 73 73 20 20 29 2f 2f 20 |indowCla|ss )// |
|000046d0| 61 64 6a 75 73 74 20 72 | 65 63 74 20 66 6f 72 20 |adjust r|ect for |
|000046e0| 5f 73 63 72 6f 6c 6c 56 | 65 72 74 2c 20 5f 73 63 |_scrollV|ert, _sc|
|000046f0| 72 6f 6c 6c 48 6f 72 7a | 20 74 79 70 65 73 0d 63 |rollHorz| types.c|
|00004700| 61 73 65 20 5f 73 63 72 | 6f 6c 6c 48 6f 72 7a 0d |ase _scr|ollHorz.|
|00004710| 73 54 79 70 65 20 3d 20 | 5f 68 6f 72 7a 53 63 72 |sType = |_horzScr|
|00004720| 6f 6c 6c 53 75 62 63 6c | 61 73 73 0d 66 6e 20 47 |ollSubcl|ass.fn G|
|00004730| 65 74 53 63 72 6c 52 65 | 63 74 46 42 28 20 73 54 |etScrlRe|ctFB( sT|
|00004740| 79 70 65 2c 20 72 2c 20 | 70 6f 72 74 52 65 63 74 |ype, r, |portRect|
|00004750| 2c 20 66 6e 20 46 42 43 | 61 6e 47 72 6f 77 28 20 |, fn FBC|anGrow( |
|00004760| 77 20 29 2c 20 77 52 65 | 66 43 6f 6e 2e 2e 46 42 |w ), wRe|fCon..FB|
|00004770| 77 57 69 6e 64 6f 77 43 | 6c 61 73 73 20 20 29 2f |wWindowC|lass )/|
|00004780| 2f 20 61 64 6a 75 73 74 | 20 72 65 63 74 20 66 6f |/ adjust| rect fo|
|00004790| 72 20 5f 73 63 72 6f 6c | 6c 56 65 72 74 2c 20 5f |r _scrol|lVert, _|
|000047a0| 73 63 72 6f 6c 6c 48 6f | 72 7a 20 74 79 70 65 73 |scrollHo|rz types|
|000047b0| 0d 63 61 73 65 20 5f 73 | 63 72 6f 6c 6c 4f 74 68 |.case _s|crollOth|
|000047c0| 65 72 0d 73 54 79 70 65 | 20 3d 20 5f 6f 74 68 65 |er.sType| = _othe|
|000047d0| 72 53 63 72 6f 6c 6c 53 | 75 62 63 6c 61 73 73 0d |rScrollS|ubclass.|
|000047e0| 69 66 20 63 52 65 63 74 | 50 74 72 20 3d 3d 20 30 |if cRect|Ptr == 0|
|000047f0| 20 74 68 65 6e 20 73 68 | 75 74 64 6f 77 6e 20 22 | then sh|utdown "|
|00004800| 53 63 72 6f 6c 6c 20 42 | 75 74 74 6f 6e 22 20 2b |Scroll B|utton" +|
|00004810| 20 73 74 72 24 28 62 74 | 6e 4e 75 6d 29 20 2b 22 | str$(bt|nNum) +"|
|00004820| 20 20 5f 73 63 72 6f 6c | 6c 4f 74 68 65 72 20 72 | _scrol|lOther r|
|00004830| 65 71 75 69 72 65 73 20 | 52 65 63 74 20 70 61 72 |equires |Rect par|
|00004840| 61 6d 65 74 65 72 22 0d | 65 6e 64 20 73 65 6c 65 |ameter".|end sele|
|00004850| 63 74 0d 0d 0d 54 45 48 | 6e 64 6c 20 3d 20 30 0d |ct...TEH|ndl = 0.|
|00004860| 6c 6f 6e 67 20 69 66 20 | 28 20 62 74 6e 4e 75 6d |long if |( btnNum|
|00004870| 20 3c 20 30 20 29 0d 62 | 74 6e 4e 75 6d 20 3d 20 | < 0 ).b|tnNum = |
|00004880| 2d 62 74 6e 4e 75 6d 0d | 54 45 48 6e 64 6c 20 3d |-btnNum.|TEHndl =|
|00004890| 20 54 45 48 61 6e 64 6c | 65 28 20 62 74 6e 4e 75 | TEHandl|e( btnNu|
|000048a0| 6d 20 29 2f 2f 20 30 20 | 69 66 20 6e 6f 20 45 46 |m )// 0 |if no EF|
|000048b0| 20 6f 66 20 73 61 6d 65 | 20 7c 62 74 6e 4e 75 6d | of same| |btnNum|
|000048c0| 7c 0d 65 6e 64 20 69 66 | 0d 0d 63 52 65 66 43 6f ||.end if|..cRefCo|
|000048d0| 6e 20 3d 20 66 6e 20 4e | 65 77 48 61 6e 64 6c 65 |n = fn N|ewHandle|
|000048e0| 43 6c 65 61 72 28 73 69 | 7a 65 6f 66 28 46 42 63 |Clear(si|zeof(FBc|
|000048f0| 6f 6e 74 72 6f 6c 44 65 | 73 63 72 69 70 74 69 6f |ontrolDe|scriptio|
|00004900| 6e 29 29 0d 69 66 20 28 | 20 63 52 65 66 43 6f 6e |n)).if (| cRefCon|
|00004910| 20 3d 3d 20 5f 6e 69 6c | 20 29 20 74 68 65 6e 20 | == _nil| ) then |
|00004920| 73 68 75 74 64 6f 77 6e | 20 22 63 52 65 66 43 6f |shutdown| "cRefCo|
|00004930| 6e 20 6e 6f 74 20 6f 62 | 74 61 69 6e 65 64 20 69 |n not ob|tained i|
|00004940| 6e 20 46 42 53 63 72 6f | 6c 6c 42 75 74 74 6f 6e |n FBScro|llButton|
|00004950| 22 0d 0d 63 20 3d 20 66 | 6e 20 4e 65 77 43 6f 6e |"..c = f|n NewCon|
|00004960| 74 72 6f 6c 28 20 77 2c | 20 72 2c 20 22 22 2c 20 |trol( w,| r, "", |
|00004970| 5f 74 72 75 65 2c 20 63 | 56 61 6c 75 65 2c 20 63 |_true, c|Value, c|
|00004980| 4d 69 6e 56 61 6c 2c 20 | 63 4d 61 78 56 61 6c 2c |MinVal, |cMaxVal,|
|00004990| 20 5f 6b 43 6f 6e 74 72 | 6f 6c 53 63 72 6f 6c 6c | _kContr|olScroll|
|000049a0| 42 61 72 4c 69 76 65 50 | 72 6f 63 2c 20 63 52 65 |BarLiveP|roc, cRe|
|000049b0| 66 43 6f 6e 20 29 0d 69 | 66 20 28 20 63 20 3d 3d |fCon ).i|f ( c ==|
|000049c0| 20 30 20 29 20 74 68 65 | 6e 20 73 68 75 74 64 6f | 0 ) the|n shutdo|
|000049d0| 77 6e 20 22 4e 65 77 43 | 6f 6e 74 72 6f 6c 20 66 |wn "NewC|ontrol f|
|000049e0| 61 69 6c 65 64 20 69 6e | 20 46 42 53 63 72 6f 6c |ailed in| FBScrol|
|000049f0| 6c 42 75 74 74 6f 6e 22 | 0d 0d 66 6e 20 41 64 64 |lButton"|..fn Add|
|00004a00| 46 42 43 6f 6e 74 72 6f | 6c 54 6f 4c 69 73 74 28 |FBContro|lToList(|
|00004a10| 20 77 52 65 66 43 6f 6e | 2c 20 63 2c 20 63 52 65 | wRefCon|, c, cRe|
|00004a20| 66 43 6f 6e 20 29 0d 0d | 66 6e 20 50 75 6e 63 68 |fCon )..|fn Punch|
|00004a30| 53 63 72 6f 6c 6c 52 67 | 6e 4f 75 74 4f 66 43 6c |ScrollRg|nOutOfCl|
|00004a40| 69 70 52 67 6e 28 20 77 | 2c 20 63 2c 20 73 54 79 |ipRgn( w|, c, sTy|
|00004a50| 70 65 20 29 0d 0d 23 69 | 66 20 43 61 72 62 6f 6e |pe )..#i|f Carbon|
|00004a60| 4c 69 62 0d 53 65 74 43 | 6f 6e 74 72 6f 6c 33 32 |Lib.SetC|ontrol32|
|00004a70| 42 69 74 4d 69 6e 69 6d | 75 6d 28 20 63 2c 20 63 |BitMinim|um( c, c|
|00004a80| 4d 69 6e 56 61 6c 20 29 | 0d 53 65 74 43 6f 6e 74 |MinVal )|.SetCont|
|00004a90| 72 6f 6c 33 32 42 69 74 | 4d 61 78 69 6d 75 6d 28 |rol32Bit|Maximum(|
|00004aa0| 20 63 2c 20 63 4d 61 78 | 56 61 6c 20 29 0d 53 65 | c, cMax|Val ).Se|
|00004ab0| 74 43 6f 6e 74 72 6f 6c | 33 32 42 69 74 56 61 6c |tControl|32BitVal|
|00004ac0| 75 65 28 20 63 2c 20 63 | 56 61 6c 75 65 20 29 0d |ue( c, c|Value ).|
|00004ad0| 23 65 6e 64 69 66 0d 0d | 2f 2f 20 70 75 74 20 61 |#endif..|// put a|
|00004ae0| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 73 63 72 | copy of| the scr|
|00004af0| 6f 6c 6c 20 62 61 72 20 | 68 61 6e 64 6c 65 20 69 |oll bar |handle i|
|00004b00| 6e 20 74 68 65 20 77 52 | 65 66 43 6f 6e 0d 73 65 |n the wR|efCon.se|
|00004b10| 6c 65 63 74 20 73 54 79 | 70 65 0d 63 61 73 65 20 |lect sTy|pe.case |
|00004b20| 5f 76 65 72 74 53 63 72 | 6f 6c 6c 53 75 62 63 6c |_vertScr|ollSubcl|
|00004b30| 61 73 73 0d 77 52 65 66 | 43 6f 6e 2e 2e 46 42 77 |ass.wRef|Con..FBw|
|00004b40| 56 53 63 72 6f 6c 6c 48 | 20 3d 20 63 0d 63 61 73 |VScrollH| = c.cas|
|00004b50| 65 20 5f 68 6f 72 7a 53 | 63 72 6f 6c 6c 53 75 62 |e _horzS|crollSub|
|00004b60| 63 6c 61 73 73 0d 77 52 | 65 66 43 6f 6e 2e 2e 46 |class.wR|efCon..F|
|00004b70| 42 77 48 53 63 72 6f 6c | 6c 48 20 3d 20 63 0d 65 |BwHScrol|lH = c.e|
|00004b80| 6e 64 20 73 65 6c 65 63 | 74 0d 0d 63 52 65 66 43 |nd selec|t..cRefC|
|00004b90| 6f 6e 2e 2e 46 42 63 6f | 6e 74 72 6f 6c 50 61 67 |on..FBco|ntrolPag|
|00004ba0| 65 20 20 20 3d 20 63 50 | 61 67 65 0d 63 52 65 66 |e = cP|age.cRef|
|00004bb0| 43 6f 6e 2e 2e 46 42 63 | 6f 6e 74 72 6f 6c 52 65 |Con..FBc|ontrolRe|
|00004bc0| 66 20 20 20 20 3d 20 62 | 74 6e 4e 75 6d 0d 63 52 |f = b|tnNum.cR|
|00004bd0| 65 66 43 6f 6e 2e 2e 46 | 42 63 6f 6e 74 72 6f 6c |efCon..F|Bcontrol|
|00004be0| 43 6c 61 73 73 20 20 3d | 20 5f 62 75 74 74 6f 6e |Class =| _button|
|00004bf0| 43 6f 6e 74 72 6f 6c 43 | 6c 61 73 73 0d 63 52 65 |ControlC|lass.cRe|
|00004c00| 66 43 6f 6e 2e 2e 46 42 | 63 6e 74 72 6c 53 75 62 |fCon..FB|cntrlSub|
|00004c10| 63 6c 61 73 73 20 3d 20 | 73 54 79 70 65 0d 0d 6c |class = |sType..l|
|00004c20| 6f 6e 67 20 69 66 20 54 | 45 48 6e 64 6c 20 2f 2f |ong if T|EHndl //|
|00004c30| 20 20 61 74 74 61 63 68 | 65 64 20 74 6f 20 61 6e | attach|ed to an|
|00004c40| 20 45 46 0d 65 66 63 48 | 6e 64 6c 20 3d 20 66 6e | EF.efcH|ndl = fn|
|00004c50| 20 46 42 46 69 6e 64 45 | 46 28 20 62 74 6e 4e 75 | FBFindE|F( btnNu|
|00004c60| 6d 2c 20 5f 61 6c 6c 45 | 46 53 75 62 43 6c 61 73 |m, _allE|FSubClas|
|00004c70| 73 65 73 2c 20 77 20 29 | 0d 6c 6f 6e 67 20 69 66 |ses, w )|.long if|
|00004c80| 20 65 66 63 48 6e 64 6c | 0d 63 52 65 66 43 6f 6e | efcHndl|.cRefCon|
|00004c90| 2e 2e 46 42 74 65 48 6e | 64 6c 20 20 20 20 20 20 |..FBteHn|dl |
|00004ca0| 3d 20 54 45 48 6e 64 6c | 20 2f 2f 20 73 63 72 6f |= TEHndl| // scro|
|00004cb0| 6c 6c 20 62 61 72 20 6b | 6e 6f 77 73 20 74 68 65 |ll bar k|nows the|
|00004cc0| 20 54 45 52 65 63 0d 63 | 52 65 66 43 6f 6e 2e 2e | TERec.c|RefCon..|
|00004cd0| 46 42 65 66 4c 69 6e 6b | 63 48 6e 64 6c 20 3d 20 |FBefLink|cHndl = |
|00004ce0| 65 66 63 48 6e 64 6c 2f | 2f 20 73 63 72 6f 6c 6c |efcHndl/|/ scroll|
|00004cf0| 20 62 61 72 20 6b 6e 6f | 77 73 20 74 68 65 20 54 | bar kno|ws the T|
|00004d00| 45 20 63 6f 6e 74 72 6f | 6c 20 68 61 6e 64 6c 65 |E contro|l handle|
|00004d10| 0d 65 66 63 52 65 66 43 | 6f 6e 20 3d 20 66 6e 20 |.efcRefC|on = fn |
|00004d20| 47 65 74 43 52 65 66 43 | 6f 6e 28 20 65 66 63 48 |GetCRefC|on( efcH|
|00004d30| 6e 64 6c 20 29 0d 69 66 | 20 66 6e 20 49 73 43 52 |ndl ).if| fn IsCR|
|00004d40| 65 66 43 6f 6e 46 42 48 | 61 6e 64 6c 65 28 20 65 |efConFBH|andle( e|
|00004d50| 66 63 52 65 66 43 6f 6e | 20 29 20 74 68 65 6e 20 |fcRefCon| ) then |
|00004d60| 65 66 63 52 65 66 43 6f | 6e 2e 2e 46 42 65 66 4c |efcRefCo|n..FBefL|
|00004d70| 69 6e 6b 63 48 6e 64 6c | 20 3d 20 63 20 2f 2f 20 |inkcHndl| = c // |
|00004d80| 73 6f 20 45 46 20 6b 6e | 6f 77 73 20 74 68 65 20 |so EF kn|ows the |
|00004d90| 73 63 72 6f 6c 6c 20 62 | 61 72 0d 66 6e 20 46 69 |scroll b|ar.fn Fi|
|00004da0| 78 4c 69 6e 6b 65 64 53 | 63 72 6f 6c 6c 42 61 72 |xLinkedS|crollBar|
|00004db0| 28 20 65 66 63 48 6e 64 | 6c 20 29 0d 65 6e 64 20 |( efcHnd|l ).end |
|00004dc0| 69 66 0d 65 6e 64 20 69 | 66 0d 0d 78 65 6c 73 65 |if.end i|f..xelse|
|00004dd0| 20 2f 2f 20 65 78 69 73 | 74 73 20 61 6c 72 65 61 | // exis|ts alrea|
|00004de0| 64 79 0d 0d 63 52 65 66 | 43 6f 6e 20 3d 20 66 6e |dy..cRef|Con = fn|
|00004df0| 20 47 65 74 43 6f 6e 74 | 72 6f 6c 52 65 66 65 72 | GetCont|rolRefer|
|00004e00| 65 6e 63 65 28 20 63 20 | 29 0d 6c 6f 6e 67 20 69 |ence( c |).long i|
|00004e10| 66 20 66 6e 20 49 73 43 | 52 65 66 43 6f 6e 46 42 |f fn IsC|RefConFB|
|00004e20| 48 61 6e 64 6c 65 28 20 | 63 52 65 66 43 6f 6e 20 |Handle( |cRefCon |
|00004e30| 29 0d 73 54 79 70 65 20 | 3d 20 63 52 65 66 43 6f |).sType |= cRefCo|
|00004e40| 6e 2e 2e 46 42 63 6e 74 | 72 6c 53 75 62 63 6c 61 |n..FBcnt|rlSubcla|
|00004e50| 73 73 0d 6c 6f 6e 67 20 | 69 66 20 73 54 79 70 65 |ss.long |if sType|
|00004e60| 20 21 3d 20 5f 76 65 72 | 74 53 63 72 6f 6c 6c 53 | != _ver|tScrollS|
|00004e70| 75 62 63 6c 61 73 73 20 | 61 6e 64 20 73 54 79 70 |ubclass |and sTyp|
|00004e80| 65 20 21 3d 20 5f 68 6f | 72 7a 53 63 72 6f 6c 6c |e != _ho|rzScroll|
|00004e90| 53 75 62 63 6c 61 73 73 | 20 61 6e 64 20 73 54 79 |Subclass| and sTy|
|00004ea0| 70 65 20 21 3d 20 5f 6f | 74 68 65 72 53 63 72 6f |pe != _o|therScro|
|00004eb0| 6c 6c 53 75 62 63 6c 61 | 73 73 20 0d 73 68 75 74 |llSubcla|ss .shut|
|00004ec0| 64 6f 77 6e 20 22 42 75 | 74 74 6f 6e 20 22 20 2b |down "Bu|tton " +|
|00004ed0| 73 74 72 24 28 20 62 74 | 6e 4e 75 6d 20 29 20 2b |str$( bt|nNum ) +|
|00004ee0| 20 22 20 61 6c 72 65 61 | 64 79 20 65 78 69 73 74 | " alrea|dy exist|
|00004ef0| 73 22 0d 65 6e 64 20 69 | 66 0d 0d 6c 6f 6e 67 20 |s".end i|f..long |
|00004f00| 69 66 20 63 52 65 63 74 | 50 74 72 20 61 6e 64 20 |if cRect|Ptr and |
|00004f10| 28 20 73 54 79 70 65 20 | 3d 3d 20 5f 6f 74 68 65 |( sType |== _othe|
|00004f20| 72 53 63 72 6f 6c 6c 53 | 75 62 63 6c 61 73 73 20 |rScrollS|ubclass |
|00004f30| 29 20 2f 2f 20 63 68 61 | 6e 67 65 20 70 6f 73 69 |) // cha|nge posi|
|00004f40| 74 69 6f 6e 2c 20 73 69 | 7a 65 0d 66 6e 20 52 65 |tion, si|ze.fn Re|
|00004f50| 73 74 6f 72 65 53 63 72 | 6f 6c 6c 52 67 6e 54 6f |storeScr|ollRgnTo|
|00004f60| 43 6c 69 70 52 67 6e 28 | 20 77 2c 20 63 2c 20 5f |ClipRgn(| w, c, _|
|00004f70| 6f 74 68 65 72 53 63 72 | 6f 6c 6c 53 75 62 63 6c |otherScr|ollSubcl|
|00004f80| 61 73 73 20 29 0d 66 6e | 20 47 65 74 43 6f 6e 74 |ass ).fn| GetCont|
|00004f90| 72 6f 6c 42 6f 75 6e 64 | 73 28 20 63 2c 20 6f 6c |rolBound|s( c, ol|
|00004fa0| 64 52 20 29 0d 4d 6f 76 | 65 43 6f 6e 74 72 6f 6c |dR ).Mov|eControl|
|00004fb0| 28 20 63 2c 20 72 2e 6c | 65 66 74 2c 20 72 2e 74 |( c, r.l|eft, r.t|
|00004fc0| 6f 70 20 29 0d 53 69 7a | 65 43 6f 6e 74 72 6f 6c |op ).Siz|eControl|
|00004fd0| 28 20 63 2c 20 72 2e 72 | 69 67 68 74 20 2d 20 72 |( c, r.r|ight - r|
|00004fe0| 2e 6c 65 66 74 2c 20 72 | 2e 62 6f 74 74 6f 6d 20 |.left, r|.bottom |
|00004ff0| 2d 20 72 2e 74 6f 70 20 | 29 0d 66 6e 20 50 75 6e |- r.top |).fn Pun|
|00005000| 63 68 53 63 72 6f 6c 6c | 52 67 6e 4f 75 74 4f 66 |chScroll|RgnOutOf|
|00005010| 43 6c 69 70 52 67 6e 28 | 20 77 2c 20 63 2c 20 5f |ClipRgn(| w, c, _|
|00005020| 6f 74 68 65 72 53 63 72 | 6f 6c 6c 53 75 62 63 6c |otherScr|ollSubcl|
|00005030| 61 73 73 20 29 0d 45 72 | 61 73 65 52 65 63 74 28 |ass ).Er|aseRect(|
|00005040| 20 6f 6c 64 52 20 29 0d | 65 6e 64 20 69 66 0d 72 | oldR ).|end if.r|
|00005050| 65 64 72 61 77 20 3d 20 | 5f 66 61 6c 73 65 0d 0d |edraw = |_false..|
|00005060| 0d 6c 6f 6e 67 20 69 66 | 20 63 56 61 6c 75 65 20 |.long if| cValue |
|00005070| 20 3e 20 5f 6d 69 6e 49 | 6e 74 0d 23 69 66 20 43 | > _minI|nt.#if C|
|00005080| 61 72 62 6f 6e 4c 69 62 | 0d 53 65 74 43 6f 6e 74 |arbonLib|.SetCont|
|00005090| 72 6f 6c 33 32 42 69 74 | 56 61 6c 75 65 28 20 63 |rol32Bit|Value( c|
|000050a0| 2c 20 63 56 61 6c 75 65 | 20 29 0d 23 65 6e 64 69 |, cValue| ).#endi|
|000050b0| 66 0d 53 65 74 43 6f 6e | 74 72 6f 6c 56 61 6c 75 |f.SetCon|trolValu|
|000050c0| 65 28 20 63 2c 20 63 56 | 61 6c 75 65 20 29 0d 72 |e( c, cV|alue ).r|
|000050d0| 65 64 72 61 77 20 3d 20 | 5f 7a 54 72 75 65 0d 65 |edraw = |_zTrue.e|
|000050e0| 6e 64 20 69 66 0d 6c 6f | 6e 67 20 69 66 20 63 4d |nd if.lo|ng if cM|
|000050f0| 69 6e 56 61 6c 20 3e 20 | 5f 6d 69 6e 49 6e 74 0d |inVal > |_minInt.|
|00005100| 23 69 66 20 43 61 72 62 | 6f 6e 4c 69 62 0d 53 65 |#if Carb|onLib.Se|
|00005110| 74 43 6f 6e 74 72 6f 6c | 33 32 42 69 74 4d 69 6e |tControl|32BitMin|
|00005120| 69 6d 75 6d 28 20 63 2c | 20 63 4d 69 6e 56 61 6c |imum( c,| cMinVal|
|00005130| 20 29 0d 23 65 6e 64 69 | 66 0d 53 65 74 43 6f 6e | ).#endi|f.SetCon|
|00005140| 74 72 6f 6c 4d 69 6e 69 | 6d 75 6d 28 20 63 2c 20 |trolMini|mum( c, |
|00005150| 63 4d 69 6e 56 61 6c 20 | 29 0d 72 65 64 72 61 77 |cMinVal |).redraw|
|00005160| 20 3d 20 5f 7a 54 72 75 | 65 0d 65 6e 64 20 69 66 | = _zTru|e.end if|
|00005170| 0d 6c 6f 6e 67 20 69 66 | 20 63 4d 61 78 56 61 6c |.long if| cMaxVal|
|00005180| 20 3e 20 5f 6d 69 6e 49 | 6e 74 0d 23 69 66 20 43 | > _minI|nt.#if C|
|00005190| 61 72 62 6f 6e 4c 69 62 | 0d 53 65 74 43 6f 6e 74 |arbonLib|.SetCont|
|000051a0| 72 6f 6c 33 32 42 69 74 | 4d 61 78 69 6d 75 6d 28 |rol32Bit|Maximum(|
|000051b0| 20 63 2c 20 63 4d 61 78 | 56 61 6c 20 29 0d 23 65 | c, cMax|Val ).#e|
|000051c0| 6e 64 69 66 0d 53 65 74 | 43 6f 6e 74 72 6f 6c 4d |ndif.Set|ControlM|
|000051d0| 61 78 69 6d 75 6d 28 20 | 63 2c 20 63 4d 61 78 56 |aximum( |c, cMaxV|
|000051e0| 61 6c 20 29 0d 72 65 64 | 72 61 77 20 3d 20 5f 7a |al ).red|raw = _z|
|000051f0| 54 72 75 65 0d 65 6e 64 | 20 69 66 0d 6c 6f 6e 67 |True.end| if.long|
|00005200| 20 69 66 20 72 65 64 72 | 61 77 0d 66 6e 20 53 65 | if redr|aw.fn Se|
|00005210| 74 43 6c 69 70 57 69 64 | 65 4f 70 65 6e 28 20 77 |tClipWid|eOpen( w|
|00005220| 20 29 0d 44 72 61 77 4f | 6e 65 43 6f 6e 74 72 6f | ).DrawO|neContro|
|00005230| 6c 28 20 63 20 29 0d 66 | 6e 20 53 65 74 43 6c 69 |l( c ).f|n SetCli|
|00005240| 70 53 68 75 74 6f 75 74 | 43 6f 6e 74 72 6f 6c 73 |pShutout|Controls|
|00005250| 28 20 77 20 29 0d 65 6e | 64 20 69 66 0d 69 66 20 |( w ).en|d if.if |
|00005260| 63 50 61 67 65 20 3e 20 | 30 20 20 74 68 65 6e 20 |cPage > |0 then |
|00005270| 63 52 65 66 43 6f 6e 2e | 2e 46 42 63 6f 6e 74 72 |cRefCon.|.FBcontr|
|00005280| 6f 6c 50 61 67 65 20 3d | 20 63 50 61 67 65 0d 65 |olPage =| cPage.e|
|00005290| 6e 64 20 69 66 0d 0d 65 | 6e 64 20 69 66 0d 66 6e |nd if..e|nd if.fn|
|000052a0| 20 47 65 74 43 6f 6e 74 | 72 6f 6c 42 6f 75 6e 64 | GetCont|rolBound|
|000052b0| 73 28 20 63 2c 20 72 20 | 29 0d 6f 73 53 74 61 74 |s( c, r |).osStat|
|000052c0| 75 73 20 3d 20 66 6e 20 | 56 61 6c 69 64 57 69 6e |us = fn |ValidWin|
|000052d0| 64 6f 77 52 65 63 74 28 | 20 77 2c 20 72 20 29 2f |dowRect(| w, r )/|
|000052e0| 2f 20 43 6f 6e 74 72 6f | 6c 20 68 61 73 20 62 65 |/ Contro|l has be|
|000052f0| 65 6e 20 72 65 64 72 61 | 77 6e 0d 65 6e 64 20 66 |en redra|wn.end f|
|00005300| 6e 0d 0d 0d 2f 2a 0d 20 | 20 20 20 20 42 55 54 54 |n.../*. | BUTT|
|00005310| 4f 4e 20 5b 23 5d 6e 75 | 6d 5b 2c 73 74 61 74 65 |ON [#]nu|m[,state|
|00005320| 5d 5b 2c 6e 61 6d 65 5d | 5b 2c 72 65 63 74 5d 5b |][,name]|[,rect][|
|00005330| 2c 74 79 70 65 5d 5b 2c | 72 65 63 6f 72 64 50 74 |,type][,|recordPt|
|00005340| 72 5d 0d 20 20 20 20 20 | 72 65 63 6f 72 64 50 74 |r]. |recordPt|
|00005350| 72 20 6d 61 79 20 62 65 | 20 7a 65 72 6f 20 20 20 |r may be| zero |
|00005360| 20 20 20 44 65 66 61 75 | 6c 74 20 76 61 6c 75 65 | Defau|lt value|
|00005370| 73 20 61 72 65 20 75 73 | 65 64 0d 20 20 20 20 20 |s are us|ed. |
|00005380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005390| 20 70 6f 73 69 74 69 76 | 65 20 20 54 6f 20 70 6f | positiv|e To po|
|000053a0| 69 6e 74 20 74 6f 20 61 | 20 46 42 63 6f 6e 74 72 |int to a| FBcontr|
|000053b0| 6f 6c 44 65 73 63 72 69 | 70 74 69 6f 6e 20 72 65 |olDescri|ption re|
|000053c0| 63 6f 72 64 0d 20 20 20 | 20 20 20 20 20 20 20 20 |cord. | |
|000053d0| 20 20 20 20 20 20 20 20 | 20 20 20 6e 65 67 61 74 | | negat|
|000053e0| 69 76 65 20 20 54 6f 20 | 70 72 6f 76 69 64 65 20 |ive To |provide |
|000053f0| 73 70 65 63 69 66 69 63 | 20 66 65 61 74 75 72 65 |specific| feature|
|00005400| 73 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s . | |
|00005410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005420| 20 20 20 28 53 65 65 20 | 43 6f 6e 74 72 6f 6c 20 | (See |Control |
|00005430| 46 65 61 74 75 72 65 20 | 45 6e 75 6d 73 20 69 6e |Feature |Enums in|
|00005440| 20 52 6e 74 6d 20 41 70 | 70 65 61 72 61 6e 63 65 | Rntm Ap|pearance|
|00005450| 2e 47 6c 62 6c 29 20 3f | 3f 0d 2a 2f 0d 0d 2f 2f |.Glbl) ?|?.*/..//|
|00005460| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 6e 65 | This ro|utine ne|
|00005470| 65 64 73 20 72 65 77 72 | 69 74 65 20 20 20 20 20 |eds rewr|ite |
|00005480| 20 52 50 0d 6c 6f 63 61 | 6c 20 6d 6f 64 65 0d 64 | RP.loca|l mode.d|
|00005490| 69 6d 20 40 20 70 6f 72 | 74 20 20 20 20 20 61 73 |im @ por|t as|
|000054a0| 20 43 47 72 61 66 50 74 | 72 0d 64 69 6d 20 40 20 | CGrafPt|r.dim @ |
|000054b0| 77 20 20 20 20 20 20 20 | 20 61 73 20 57 69 6e 64 |w | as Wind|
|000054c0| 6f 77 52 65 66 0d 64 69 | 6d 20 40 20 77 4e 75 6d |owRef.di|m @ wNum|
|000054d0| 20 20 20 20 20 61 73 20 | 6c 6f 6e 67 0d 64 69 6d | as |long.dim|
|000054e0| 20 63 20 20 20 20 20 20 | 20 20 20 20 61 73 20 43 | c | as C|
|000054f0| 6f 6e 74 72 6f 6c 52 65 | 66 0d 64 69 6d 20 63 56 |ontrolRe|f.dim cV|
|00005500| 61 6c 75 65 20 20 20 20 | 20 61 73 20 6c 6f 6e 67 |alue | as long|
|00005510| 0d 64 69 6d 20 72 20 20 | 20 20 20 20 20 20 20 20 |.dim r | |
|00005520| 61 73 20 72 65 63 74 0d | 64 69 6d 20 63 52 65 66 |as rect.|dim cRef|
|00005530| 43 6f 6e 20 20 20 20 61 | 73 20 5e 5e 46 42 63 6f |Con a|s ^^FBco|
|00005540| 6e 74 72 6f 6c 44 65 73 | 63 72 69 70 74 69 6f 6e |ntrolDes|cription|
|00005550| 0d 64 69 6d 20 77 52 65 | 66 43 6f 6e 20 20 20 20 |.dim wRe|fCon |
|00005560| 61 73 20 5e 5e 46 42 77 | 69 6e 64 6f 77 44 65 73 |as ^^FBw|indowDes|
|00005570| 63 72 69 70 74 69 6f 6e | 0d 64 69 6d 20 63 6f 6e |cription|.dim con|
|00005580| 74 72 6f 6c 54 61 67 20 | 61 73 20 6c 6f 6e 67 0d |trolTag |as long.|
|00005590| 64 69 6d 20 6f 73 53 74 | 61 74 75 73 20 20 20 61 |dim osSt|atus a|
|000055a0| 73 20 4f 53 53 74 61 74 | 75 73 0d 64 69 6d 20 63 |s OSStat|us.dim c|
|000055b0| 54 69 74 6c 65 20 20 20 | 20 20 61 73 20 73 74 72 |Title | as str|
|000055c0| 32 35 35 0d 64 69 6d 20 | 65 72 72 20 20 20 20 20 |255.dim |err |
|000055d0| 20 20 20 61 73 20 73 68 | 6f 72 74 0d 64 69 6d 20 | as sh|ort.dim |
|000055e0| 40 20 62 6f 6f 6c 20 20 | 20 20 20 61 73 20 62 6f |@ bool | as bo|
|000055f0| 6f 6c 65 61 6e 20 2f 2f | 20 3f 3f 0d 64 69 6d 20 |olean //| ??.dim |
|00005600| 6e 65 77 43 6f 6e 74 72 | 6f 6c 20 61 73 20 62 6f |newContr|ol as bo|
|00005610| 6f 6c 65 61 6e 0d 64 69 | 6d 20 6d 61 6b 65 49 6e |olean.di|m makeIn|
|00005620| 76 69 73 20 20 61 73 20 | 62 6f 6f 6c 65 61 6e 0d |vis as |boolean.|
|00005630| 64 69 6d 20 69 73 56 69 | 73 20 20 20 20 20 20 61 |dim isVi|s a|
|00005640| 73 20 62 6f 6f 6c 65 61 | 6e 0d 64 69 6d 20 6c 65 |s boolea|n.dim le|
|00005650| 67 61 63 79 52 75 62 62 | 69 73 68 20 61 73 20 62 |gacyRubb|ish as b|
|00005660| 6f 6f 6c 65 61 6e 0d 64 | 69 6d 20 26 0d 72 75 6e |oolean.d|im &.run|
|00005670| 74 69 6d 65 20 46 42 42 | 75 74 74 6f 6e 28 20 62 |time FBB|utton( b|
|00005680| 74 6e 4e 75 6d 20 61 73 | 20 6c 6f 6e 67 2c 20 63 |tnNum as| long, c|
|00005690| 53 74 61 74 65 20 61 73 | 20 6c 6f 6e 67 2c 20 63 |State as| long, c|
|000056a0| 54 69 74 6c 65 50 74 72 | 20 61 73 20 5e 73 74 72 |TitlePtr| as ^str|
|000056b0| 32 35 35 2c 20 63 52 65 | 63 74 50 74 72 20 61 73 |255, cRe|ctPtr as|
|000056c0| 20 5e 72 65 63 74 2c 20 | 63 54 79 70 65 20 61 73 | ^rect, |cType as|
|000056d0| 20 6c 6f 6e 67 2c 20 40 | 63 52 65 63 6f 72 64 50 | long, @|cRecordP|
|000056e0| 74 72 20 61 73 20 5e 46 | 42 63 6f 6e 74 72 6f 6c |tr as ^F|Bcontrol|
|000056f0| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 29 0d 27 7e |Descript|ion ).'~|
|00005700| 27 31 0d 66 6e 20 46 42 | 67 65 74 43 75 72 57 6e |'1.fn FB|getCurWn|
|00005710| 64 49 6e 66 6f 28 20 70 | 6f 72 74 2c 20 77 2c 20 |dInfo( p|ort, w, |
|00005720| 77 4e 75 6d 29 0d 69 66 | 20 77 4e 75 6d 20 3d 3d |wNum).if| wNum ==|
|00005730| 20 30 20 74 68 65 6e 20 | 65 78 69 74 20 66 6e 2f | 0 then |exit fn/|
|00005740| 2f 20 6e 6f 20 46 42 20 | 57 69 6e 64 6f 77 0d 0d |/ no FB |Window..|
|00005750| 6c 6f 6e 67 20 69 66 20 | 63 52 65 63 6f 72 64 50 |long if |cRecordP|
|00005760| 74 72 0d 66 6e 20 52 75 | 6e 74 69 6d 65 45 72 72 |tr.fn Ru|ntimeErr|
|00005770| 4d 73 67 28 20 22 41 6e | 20 65 78 74 72 61 20 70 |Msg( "An| extra p|
|00005780| 61 72 61 6d 65 74 65 72 | 20 77 61 73 20 73 75 70 |arameter| was sup|
|00005790| 70 6c 69 65 64 20 66 6f | 72 20 42 75 74 74 6f 6e |plied fo|r Button|
|000057a0| 20 22 20 2b 20 73 74 72 | 24 28 20 62 74 6e 4e 75 | " + str|$( btnNu|
|000057b0| 6d 20 29 20 2b 20 22 20 | 69 6e 20 77 69 6e 64 6f |m ) + " |in windo|
|000057c0| 77 20 22 20 2b 20 73 74 | 72 24 28 20 77 4e 75 6d |w " + st|r$( wNum|
|000057d0| 20 29 20 29 0d 65 78 69 | 74 20 66 6e 0d 65 6e 64 | ) ).exi|t fn.end|
|000057e0| 20 69 66 0d 0d 69 66 20 | 62 74 6e 4e 75 6d 20 3d | if..if |btnNum =|
|000057f0| 3d 20 30 20 74 68 65 6e | 20 66 6e 20 52 75 6e 74 |= 0 then| fn Runt|
|00005800| 69 6d 65 45 72 72 4d 73 | 67 28 20 22 5a 65 72 6f |imeErrMs|g( "Zero|
|00005810| 20 69 64 20 69 6e 20 42 | 75 74 74 6f 6e 20 73 74 | id in B|utton st|
|00005820| 61 74 65 6d 65 6e 74 22 | 20 29 3a 20 65 78 69 74 |atement"| ): exit|
|00005830| 20 66 6e 0d 0d 6c 6f 6e | 67 20 69 66 20 63 54 69 | fn..lon|g if cTi|
|00005840| 74 6c 65 50 74 72 2f 2f | 20 4e 61 6d 65 20 53 70 |tlePtr//| Name Sp|
|00005850| 65 63 69 66 69 65 64 0d | 66 6e 20 53 79 73 4d 6f |ecified.|fn SysMo|
|00005860| 76 65 53 74 72 69 6e 67 | 28 20 63 54 69 74 6c 65 |veString|( cTitle|
|00005870| 50 74 72 2c 20 40 63 54 | 69 74 6c 65 20 29 0d 78 |Ptr, @cT|itle ).x|
|00005880| 65 6c 73 65 0d 63 54 69 | 74 6c 65 5b 30 5d 20 3d |else.cTi|tle[0] =|
|00005890| 20 30 0d 65 6e 64 20 69 | 66 0d 0d 6d 61 6b 65 49 | 0.end i|f..makeI|
|000058a0| 6e 76 69 73 20 20 3d 20 | 28 20 62 74 6e 4e 75 6d |nvis = |( btnNum|
|000058b0| 20 3c 20 30 20 29 0d 62 | 74 6e 4e 75 6d 20 20 20 | < 0 ).b|tnNum |
|000058c0| 20 20 3d 20 61 62 73 28 | 20 62 74 6e 4e 75 6d 20 | = abs(| btnNum |
|000058d0| 29 0d 0d 63 20 20 20 20 | 20 20 20 20 3d 20 66 6e |)..c | = fn|
|000058e0| 20 46 69 6e 64 46 42 42 | 74 6e 43 6f 6e 74 72 6f | FindFBB|tnContro|
|000058f0| 6c 28 20 77 2c 20 62 74 | 6e 4e 75 6d 20 29 0d 6e |l( w, bt|nNum ).n|
|00005900| 65 77 43 6f 6e 74 72 6f | 6c 20 3d 20 28 63 20 3d |ewContro|l = (c =|
|00005910| 3d 20 30 29 0d 0d 6c 6f | 6e 67 20 69 66 20 6e 65 |= 0)..lo|ng if ne|
|00005920| 77 43 6f 6e 74 72 6f 6c | 0d 63 6f 6e 74 72 6f 6c |wControl|.control|
|00005930| 54 61 67 20 20 20 20 3d | 20 30 0d 0d 6c 65 67 61 |Tag =| 0..lega|
|00005940| 63 79 52 75 62 62 69 73 | 68 20 3d 20 5f 7a 54 72 |cyRubbis|h = _zTr|
|00005950| 75 65 0d 73 65 6c 65 63 | 74 20 63 54 79 70 65 2f |ue.selec|t cType/|
|00005960| 2f 20 5f 70 75 73 68 20 | 3d 20 31 20 5f 63 68 65 |/ _push |= 1 _che|
|00005970| 63 6b 62 6f 78 20 3d 20 | 32 20 5f 72 61 64 69 6f |ckbox = |2 _radio|
|00005980| 20 3d 20 33 20 5f 73 68 | 61 64 6f 77 20 3d 20 34 | = 3 _sh|adow = 4|
|00005990| 20 0d 63 61 73 65 20 30 | 2c 20 5f 70 75 73 68 20 | .case 0|, _push |
|000059a0| 20 3a 20 63 54 79 70 65 | 20 3d 20 5f 6b 43 6f 6e | : cType| = _kCon|
|000059b0| 74 72 6f 6c 50 75 73 68 | 42 75 74 74 6f 6e 50 72 |trolPush|ButtonPr|
|000059c0| 6f 63 0d 63 61 73 65 20 | 5f 63 68 65 63 6b 62 6f |oc.case |_checkbo|
|000059d0| 78 20 3a 20 63 54 79 70 | 65 20 3d 20 5f 6b 43 6f |x : cTyp|e = _kCo|
|000059e0| 6e 74 72 6f 6c 43 68 65 | 63 6b 42 6f 78 50 72 6f |ntrolChe|ckBoxPro|
|000059f0| 63 0d 63 61 73 65 20 5f | 72 61 64 69 6f 20 20 20 |c.case _|radio |
|00005a00| 20 3a 20 63 54 79 70 65 | 20 3d 20 5f 6b 43 6f 6e | : cType| = _kCon|
|00005a10| 74 72 6f 6c 52 61 64 69 | 6f 42 75 74 74 6f 6e 50 |trolRadi|oButtonP|
|00005a20| 72 6f 63 0d 63 61 73 65 | 20 5f 73 68 61 64 6f 77 |roc.case| _shadow|
|00005a30| 0d 63 54 79 70 65 20 20 | 20 20 20 20 3d 20 5f 6b |.cType | = _k|
|00005a40| 43 6f 6e 74 72 6f 6c 50 | 75 73 68 42 75 74 74 6f |ControlP|ushButto|
|00005a50| 6e 50 72 6f 63 0d 63 6f | 6e 74 72 6f 6c 54 61 67 |nProc.co|ntrolTag|
|00005a60| 20 3d 20 5f 46 42 66 72 | 61 6d 65 43 6f 6e 74 72 | = _FBfr|ameContr|
|00005a70| 6f 6c 0d 2f 2f 20 68 6f | 6e 6f 72 61 72 79 20 27 |ol.// ho|norary '|
|00005a80| 64 65 6d 6f 74 69 6f 6e | 27 20 74 6f 20 6c 65 67 |demotion|' to leg|
|00005a90| 61 63 79 0d 63 61 73 65 | 20 5f 6b 43 6f 6e 74 72 |acy.case| _kContr|
|00005aa0| 6f 6c 43 68 65 63 6b 42 | 6f 78 50 72 6f 63 2c 20 |olCheckB|oxProc, |
|00005ab0| 5f 6b 43 6f 6e 74 72 6f | 6c 43 68 65 63 6b 42 6f |_kContro|lCheckBo|
|00005ac0| 78 41 75 74 6f 54 6f 67 | 67 6c 65 50 72 6f 63 2c |xAutoTog|gleProc,|
|00005ad0| 20 5f 6b 43 6f 6e 74 72 | 6f 6c 52 61 64 69 6f 42 | _kContr|olRadioB|
|00005ae0| 75 74 74 6f 6e 50 72 6f | 63 0d 20 0d 63 61 73 65 |uttonPro|c. .case|
|00005af0| 20 65 6c 73 65 0d 6c 65 | 67 61 63 79 52 75 62 62 | else.le|gacyRubb|
|00005b00| 69 73 68 20 3d 20 5f 66 | 61 6c 73 65 0d 65 6e 64 |ish = _f|alse.end|
|00005b10| 20 73 65 6c 65 63 74 0d | 0d 2f 2f 20 69 6e 69 74 | select.|.// init|
|00005b20| 20 76 61 6c 20 6f 6e 20 | 63 72 65 61 74 69 6f 6e | val on |creation|
|00005b30| 0d 63 56 61 6c 75 65 20 | 3d 20 63 53 74 61 74 65 |.cValue |= cState|
|00005b40| 20 2f 2f 20 64 65 66 61 | 75 6c 74 0d 6c 6f 6e 67 | // defa|ult.long|
|00005b50| 20 69 66 20 6c 65 67 61 | 63 79 52 75 62 62 69 73 | if lega|cyRubbis|
|00005b60| 68 0d 69 66 20 63 56 61 | 6c 75 65 20 3e 20 30 20 |h.if cVa|lue > 0 |
|00005b70| 74 68 65 6e 20 63 56 61 | 6c 75 65 2d 2d 2f 2f 5f |then cVa|lue--//_|
|00005b80| 67 72 61 79 42 74 6e 20 | 3d 20 30 20 5f 61 63 74 |grayBtn |= 0 _act|
|00005b90| 69 76 65 42 74 6e 20 3d | 20 31 20 5f 6d 61 72 6b |iveBtn =| 1 _mark|
|00005ba0| 65 64 42 74 6e 20 3d 20 | 32 0d 65 6e 64 20 69 66 |edBtn = |2.end if|
|00005bb0| 0d 0d 0d 6c 6f 6e 67 20 | 69 66 20 63 52 65 63 74 |...long |if cRect|
|00005bc0| 50 74 72 20 3d 3d 20 30 | 0d 66 6e 20 52 75 6e 74 |Ptr == 0|.fn Runt|
|00005bd0| 69 6d 65 45 72 72 4d 73 | 67 28 20 22 52 65 63 74 |imeErrMs|g( "Rect|
|00005be0| 20 70 61 72 61 6d 65 74 | 65 72 20 6d 75 73 74 20 | paramet|er must |
|00005bf0| 62 65 20 73 70 65 63 69 | 66 69 65 64 20 66 6f 72 |be speci|fied for|
|00005c00| 20 42 75 74 74 6f 6e 20 | 22 20 2b 20 73 74 72 24 | Button |" + str$|
|00005c10| 28 20 62 74 6e 4e 75 6d | 20 29 20 2b 20 22 20 69 |( btnNum| ) + " i|
|00005c20| 6e 20 77 69 6e 64 6f 77 | 22 20 2b 20 73 74 72 24 |n window|" + str$|
|00005c30| 28 20 77 4e 75 6d 20 29 | 20 29 0d 65 78 69 74 20 |( wNum )| ).exit |
|00005c40| 66 6e 0d 65 6e 64 20 69 | 66 0d 0d 63 52 65 66 43 |fn.end i|f..cRefC|
|00005c50| 6f 6e 20 3d 20 66 6e 20 | 4e 65 77 48 61 6e 64 6c |on = fn |NewHandl|
|00005c60| 65 43 6c 65 61 72 28 20 | 73 69 7a 65 6f 66 28 20 |eClear( |sizeof( |
|00005c70| 46 42 63 6f 6e 74 72 6f | 6c 44 65 73 63 72 69 70 |FBcontro|lDescrip|
|00005c80| 74 69 6f 6e 20 29 20 29 | 0d 69 66 20 63 52 65 66 |tion ) )|.if cRef|
|00005c90| 43 6f 6e 20 3d 3d 20 30 | 20 74 68 65 6e 20 73 68 |Con == 0| then sh|
|00005ca0| 75 74 64 6f 77 6e 20 22 | 4f 75 74 20 6f 66 20 6d |utdown "|Out of m|
|00005cb0| 65 6d 6f 72 79 20 69 6e | 20 42 75 74 74 6f 6e 20 |emory in| Button |
|00005cc0| 73 74 61 74 65 6d 65 6e | 74 22 0d 0d 69 66 20 63 |statemen|t"..if c|
|00005cd0| 52 65 63 6f 72 64 50 74 | 72 20 74 68 65 6e 20 62 |RecordPt|r then b|
|00005ce0| 6c 6f 63 6b 6d 6f 76 65 | 20 63 52 65 63 6f 72 64 |lockmove| cRecord|
|00005cf0| 50 74 72 2c 20 5b 63 52 | 65 66 43 6f 6e 5d 2c 20 |Ptr, [cR|efCon], |
|00005d00| 73 69 7a 65 6f 66 28 20 | 46 42 63 6f 6e 74 72 6f |sizeof( |FBcontro|
|00005d10| 6c 44 65 73 63 72 69 70 | 74 69 6f 6e 20 29 0d 0d |lDescrip|tion )..|
|00005d20| 63 52 65 66 43 6f 6e 2e | 2e 46 42 63 6f 6e 74 72 |cRefCon.|.FBcontr|
|00005d30| 6f 6c 52 65 66 20 20 20 | 20 3d 20 62 74 6e 4e 75 |olRef | = btnNu|
|00005d40| 6d 0d 63 52 65 66 43 6f | 6e 2e 2e 46 42 63 6f 6e |m.cRefCo|n..FBcon|
|00005d50| 74 72 6f 6c 43 6c 61 73 | 73 20 20 3d 20 5f 62 75 |trolClas|s = _bu|
|00005d60| 74 74 6f 6e 43 6f 6e 74 | 72 6f 6c 43 6c 61 73 73 |ttonCont|rolClass|
|00005d70| 0d 0d 6c 6f 6e 67 20 69 | 66 20 63 54 79 70 65 20 |..long i|f cType |
|00005d80| 3d 3d 20 5f 6b 43 6f 6e | 74 72 6f 6c 45 64 69 74 |== _kCon|trolEdit|
|00005d90| 54 65 78 74 50 72 6f 63 | 0d 63 52 65 66 43 6f 6e |TextProc|.cRefCon|
|00005da0| 2e 2e 46 42 63 6e 74 72 | 6c 53 75 62 63 6c 61 73 |..FBcntr|lSubclas|
|00005db0| 73 20 3d 20 5f 65 64 69 | 74 61 62 6c 65 42 75 74 |s = _edi|tableBut|
|00005dc0| 74 6f 6e 53 75 62 63 6c | 61 73 73 0d 78 65 6c 73 |tonSubcl|ass.xels|
|00005dd0| 65 0d 6c 6f 6e 67 20 69 | 66 20 6c 65 67 61 63 79 |e.long i|f legacy|
|00005de0| 52 75 62 62 69 73 68 20 | 61 6e 64 20 28 20 63 54 |Rubbish |and ( cT|
|00005df0| 79 70 65 20 3d 3d 20 5f | 6b 43 6f 6e 74 72 6f 6c |ype == _|kControl|
|00005e00| 50 75 73 68 42 75 74 74 | 6f 6e 50 72 6f 63 20 29 |PushButt|onProc )|
|00005e10| 0d 63 52 65 66 43 6f 6e | 2e 2e 46 42 63 6e 74 72 |.cRefCon|..FBcntr|
|00005e20| 6c 53 75 62 63 6c 61 73 | 73 20 3d 20 5f 70 75 73 |lSubclas|s = _pus|
|00005e30| 68 42 74 6e 4c 65 67 61 | 63 79 53 75 62 43 6c 61 |hBtnLega|cySubCla|
|00005e40| 73 73 0d 78 65 6c 73 65 | 0d 63 52 65 66 43 6f 6e |ss.xelse|.cRefCon|
|00005e50| 2e 2e 46 42 63 6e 74 72 | 6c 53 75 62 63 6c 61 73 |..FBcntr|lSubclas|
|00005e60| 73 20 3d 20 5f 62 75 74 | 74 6f 6e 53 75 62 63 6c |s = _but|tonSubcl|
|00005e70| 61 73 73 0d 65 6e 64 20 | 69 66 0d 65 6e 64 20 69 |ass.end |if.end i|
|00005e80| 66 0d 0d 69 66 20 63 52 | 65 66 43 6f 6e 2e 2e 46 |f..if cR|efCon..F|
|00005e90| 42 63 6f 6e 74 72 6f 6c | 4d 61 78 20 3d 3d 20 30 |Bcontrol|Max == 0|
|00005ea0| 20 74 68 65 6e 20 63 52 | 65 66 43 6f 6e 2e 2e 46 | then cR|efCon..F|
|00005eb0| 42 63 6f 6e 74 72 6f 6c | 4d 61 78 20 3d 20 31 20 |Bcontrol|Max = 1 |
|00005ec0| 2f 2f 3f 3f 0d 0d 63 52 | 65 66 43 6f 6e 2e 2e 6c |//??..cR|efCon..l|
|00005ed0| 65 67 61 63 79 52 75 62 | 62 69 73 68 20 3d 20 6c |egacyRub|bish = l|
|00005ee0| 65 67 61 63 79 52 75 62 | 62 69 73 68 0d 0d 63 20 |egacyRub|bish..c |
|00005ef0| 3d 20 66 6e 20 4e 65 77 | 43 6f 6e 74 72 6f 6c 28 |= fn New|Control(|
|00005f00| 20 77 2c 20 23 63 52 65 | 63 74 50 74 72 2c 20 63 | w, #cRe|ctPtr, c|
|00005f10| 54 69 74 6c 65 2c 20 28 | 6d 61 6b 65 49 6e 76 69 |Title, (|makeInvi|
|00005f20| 73 20 3d 3d 20 5f 66 61 | 6c 73 65 29 2c 20 63 56 |s == _fa|lse), cV|
|00005f30| 61 6c 75 65 2c 20 63 52 | 65 66 43 6f 6e 2e 2e 46 |alue, cR|efCon..F|
|00005f40| 42 63 6f 6e 74 72 6f 6c | 4d 69 6e 2c 20 63 52 65 |Bcontrol|Min, cRe|
|00005f50| 66 43 6f 6e 2e 2e 46 42 | 63 6f 6e 74 72 6f 6c 4d |fCon..FB|controlM|
|00005f60| 61 78 2c 20 63 54 79 70 | 65 2c 20 63 52 65 66 43 |ax, cTyp|e, cRefC|
|00005f70| 6f 6e 20 29 0d 69 66 20 | 63 20 3d 3d 20 30 20 74 |on ).if |c == 0 t|
|00005f80| 68 65 6e 20 73 68 75 74 | 64 6f 77 6e 20 22 45 72 |hen shut|down "Er|
|00005f90| 72 6f 72 20 69 6e 20 41 | 70 70 65 61 72 61 6e 63 |ror in A|ppearanc|
|00005fa0| 65 20 42 75 74 74 6f 6e | 20 73 74 61 74 65 6d 65 |e Button| stateme|
|00005fb0| 6e 74 3a 20 4e 65 77 43 | 6f 6e 74 72 6f 6c 20 66 |nt: NewC|ontrol f|
|00005fc0| 61 69 6c 65 64 22 0d 77 | 52 65 66 43 6f 6e 20 20 |ailed".w|RefCon |
|00005fd0| 3d 20 66 6e 20 47 65 74 | 57 52 65 66 43 6f 6e 28 |= fn Get|WRefCon(|
|00005fe0| 20 77 20 29 0d 66 6e 20 | 41 64 64 46 42 43 6f 6e | w ).fn |AddFBCon|
|00005ff0| 74 72 6f 6c 54 6f 4c 69 | 73 74 28 20 77 52 65 66 |trolToLi|st( wRef|
|00006000| 43 6f 6e 2c 20 63 2c 20 | 63 52 65 66 43 6f 6e 20 |Con, c, |cRefCon |
|00006010| 29 0d 0d 73 65 6c 65 63 | 74 20 63 6f 6e 74 72 6f |)..selec|t contro|
|00006020| 6c 54 61 67 0d 63 61 73 | 65 20 5f 46 42 66 72 61 |lTag.cas|e _FBfra|
|00006030| 6d 65 43 6f 6e 74 72 6f | 6c 0d 62 6f 6f 6c 20 3d |meContro|l.bool =|
|00006040| 20 5f 7a 54 72 75 65 0d | 65 72 72 20 20 3d 20 66 | _zTrue.|err = f|
|00006050| 6e 20 53 65 74 43 6f 6e | 74 72 6f 6c 44 61 74 61 |n SetCon|trolData|
|00006060| 28 20 63 2c 20 5f 6b 43 | 6f 6e 74 72 6f 6c 45 6e |( c, _kC|ontrolEn|
|00006070| 74 69 72 65 43 6f 6e 74 | 72 6f 6c 2c 20 5f 6b 43 |tireCont|rol, _kC|
|00006080| 6f 6e 74 72 6f 6c 50 75 | 73 68 62 75 74 74 6f 6e |ontrolPu|shbutton|
|00006090| 44 65 66 61 75 6c 74 54 | 61 67 2c 20 73 69 7a 65 |DefaultT|ag, size|
|000060a0| 6f 66 28 20 62 6f 6f 6c | 65 61 6e 20 29 2c 20 62 |of( bool|ean ), b|
|000060b0| 6f 6f 6c 20 29 0d 65 6e | 64 20 73 65 6c 65 63 74 |ool ).en|d select|
|000060c0| 0d 0d 73 65 6c 65 63 74 | 20 63 53 74 61 74 65 0d |..select| cState.|
|000060d0| 63 61 73 65 20 5f 67 72 | 61 79 42 74 6e 20 3a 20 |case _gr|ayBtn : |
|000060e0| 65 72 72 20 3d 20 66 6e | 20 44 65 61 63 74 69 76 |err = fn| Deactiv|
|000060f0| 61 74 65 43 6f 6e 74 72 | 6f 6c 28 20 63 20 29 0d |ateContr|ol( c ).|
|00006100| 63 61 73 65 20 5f 6d 61 | 72 6b 65 64 42 74 6e 3a |case _ma|rkedBtn:|
|00006110| 20 69 66 20 63 52 65 66 | 43 6f 6e 2e 2e 46 42 63 | if cRef|Con..FBc|
|00006120| 6e 74 72 6c 53 75 62 63 | 6c 61 73 73 20 3d 20 5f |ntrlSubc|lass = _|
|00006130| 70 75 73 68 42 74 6e 4c | 65 67 61 63 79 53 75 62 |pushBtnL|egacySub|
|00006140| 43 6c 61 73 73 20 74 68 | 65 6e 20 48 69 6c 69 74 |Class th|en Hilit|
|00006150| 65 43 6f 6e 74 72 6f 6c | 28 20 63 2c 20 5f 6b 43 |eControl|( c, _kC|
|00006160| 6f 6e 74 72 6f 6c 42 75 | 74 74 6f 6e 50 61 72 74 |ontrolBu|ttonPart|
|00006170| 20 29 0d 65 6e 64 20 73 | 65 6c 65 63 74 0d 0d 78 | ).end s|elect..x|
|00006180| 65 6c 73 65 2f 2f 20 43 | 6f 6e 74 72 6f 6c 20 61 |else// C|ontrol a|
|00006190| 6c 72 65 61 64 79 20 65 | 78 69 73 74 73 0d 0d 63 |lready e|xists..c|
|000061a0| 52 65 66 43 6f 6e 20 20 | 20 20 20 20 20 3d 20 66 |RefCon | = f|
|000061b0| 6e 20 47 65 74 43 52 65 | 66 43 6f 6e 28 20 63 20 |n GetCRe|fCon( c |
|000061c0| 29 0d 6c 65 67 61 63 79 | 52 75 62 62 69 73 68 20 |).legacy|Rubbish |
|000061d0| 3d 20 63 52 65 66 43 6f | 6e 2e 2e 6c 65 67 61 63 |= cRefCo|n..legac|
|000061e0| 79 52 75 62 62 69 73 68 | 0d 0d 69 66 20 63 54 69 |yRubbish|..if cTi|
|000061f0| 74 6c 65 50 74 72 20 74 | 68 65 6e 20 53 65 74 43 |tlePtr t|hen SetC|
|00006200| 6f 6e 74 72 6f 6c 54 69 | 74 6c 65 28 20 63 2c 20 |ontrolTi|tle( c, |
|00006210| 23 63 54 69 74 6c 65 50 | 74 72 20 29 20 2f 2f 20 |#cTitleP|tr ) // |
|00006220| 43 68 61 6e 67 65 20 43 | 6f 6e 74 72 6f 6c 20 54 |Change C|ontrol T|
|00006230| 69 74 6c 65 0d 0d 0d 6c | 6f 6e 67 20 69 66 20 63 |itle...l|ong if c|
|00006240| 52 65 63 74 50 74 72 2f | 2f 20 43 68 61 6e 67 65 |RectPtr/|/ Change|
|00006250| 20 50 6f 73 69 74 69 6f | 6e 20 61 6e 64 2f 6f 72 | Positio|n and/or|
|00006260| 20 73 69 7a 65 0d 4d 6f | 76 65 43 6f 6e 74 72 6f | size.Mo|veContro|
|00006270| 6c 28 20 63 2c 20 63 52 | 65 63 74 50 74 72 2e 6c |l( c, cR|ectPtr.l|
|00006280| 65 66 74 2c 20 63 52 65 | 63 74 50 74 72 2e 74 6f |eft, cRe|ctPtr.to|
|00006290| 70 20 29 0d 53 69 7a 65 | 43 6f 6e 74 72 6f 6c 28 |p ).Size|Control(|
|000062a0| 20 63 2c 20 63 52 65 63 | 74 50 74 72 2e 72 69 67 | c, cRec|tPtr.rig|
|000062b0| 68 74 20 2d 20 63 52 65 | 63 74 50 74 72 2e 6c 65 |ht - cRe|ctPtr.le|
|000062c0| 66 74 2c 20 63 52 65 63 | 74 50 74 72 2e 62 6f 74 |ft, cRec|tPtr.bot|
|000062d0| 74 6f 6d 20 2d 20 63 52 | 65 63 74 50 74 72 2e 74 |tom - cR|ectPtr.t|
|000062e0| 6f 70 20 29 0d 65 6e 64 | 20 69 66 0d 0d 66 6e 20 |op ).end| if..fn |
|000062f0| 47 65 74 43 6f 6e 74 72 | 6f 6c 42 6f 75 6e 64 73 |GetContr|olBounds|
|00006300| 28 20 63 2c 20 72 20 29 | 0d 69 73 56 69 73 20 3d |( c, r )|.isVis =|
|00006310| 20 66 6e 20 49 73 43 6f | 6e 74 72 6f 6c 56 69 73 | fn IsCo|ntrolVis|
|00006320| 69 62 6c 65 28 20 63 20 | 29 0d 6c 6f 6e 67 20 69 |ible( c |).long i|
|00006330| 66 20 6d 61 6b 65 49 6e | 76 69 73 0d 6c 6f 6e 67 |f makeIn|vis.long|
|00006340| 20 69 66 20 69 73 56 69 | 73 0d 48 69 64 65 43 6f | if isVi|s.HideCo|
|00006350| 6e 74 72 6f 6c 28 20 63 | 20 29 0d 65 6e 64 20 69 |ntrol( c| ).end i|
|00006360| 66 0d 78 65 6c 73 65 0d | 6c 6f 6e 67 20 69 66 20 |f.xelse.|long if |
|00006370| 69 73 56 69 73 20 3d 3d | 20 5f 66 61 6c 73 65 0d |isVis ==| _false.|
|00006380| 53 68 6f 77 43 6f 6e 74 | 72 6f 6c 28 20 63 20 29 |ShowCont|rol( c )|
|00006390| 0d 6f 73 53 74 61 74 75 | 73 20 3d 20 66 6e 20 56 |.osStatu|s = fn V|
|000063a0| 61 6c 69 64 57 69 6e 64 | 6f 77 52 65 63 74 28 20 |alidWind|owRect( |
|000063b0| 77 2c 20 72 20 29 0d 65 | 6e 64 20 69 66 0d 65 6e |w, r ).e|nd if.en|
|000063c0| 64 20 69 66 0d 0d 0d 6c | 6f 6e 67 20 69 66 20 6c |d if...l|ong if l|
|000063d0| 65 67 61 63 79 52 75 62 | 62 69 73 68 0d 73 65 6c |egacyRub|bish.sel|
|000063e0| 65 63 74 20 63 61 73 65 | 20 20 63 53 74 61 74 65 |ect case| cState|
|000063f0| 20 2f 2f 20 43 68 61 6e | 67 65 20 6c 65 67 61 63 | // Chan|ge legac|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.